View Single Post
Old 10-23-2018, 10:29 AM   #27
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,917
Karma: 6240958
Join Date: Nov 2009
Device: many
Ahh! So I missed adding a call to setIniCodec in the SaveData() routine in ClipEditorModel.cpp whcih when I added it and recompiled then open and saved the clips, I now see the following in sigil-clips.ini

Code:
20\Name=Example Clips/Miscellaneous/lowercase
20\Text=\\L\\1\\E
21\Name=Example Clips/Miscellaneous/Titlecase
21\Text=\\u\\1
22\Name=Krishna
22\Text=Kṛṣṇa
23\Name=Krishna2
23\Text=Kṛṣṇa
So it looks like it works just fine if we use setIniCodec to utf-8 both in LoadData() and SaveData() immedately after the SettingsStore object in created. It nicely groks hex escapes on input but saves them as utf-8.

So it appears we can easily convert clips and searches ini files to use utf-8 with no consequences at least if the users do not downgrade Sigil after the change.

What do you think?

KevinH
KevinH is offline   Reply With Quote