Question

I'm looking for the best option to store my application settings. I decided to write own class that inherits from TPersistent which would store all the config options available. Currently I'm looking for the best way to save it - and I found JvAppStorage which looked very promising (as I'm using JVCL in my project anyway...) but it doesn't handle unicode (WideStrings) properly. For XML files it stores chars as entities, for ini file it seems to be stored ok, but in both cases loading strings replaces the text with lots of question marks...

Is there any good replacement that handles Unicode as well?

Thanks in advance.

Was it helpful?

Solution

Recently converted to JSON from ini files (and dreaded xml!) for setting storage. It's just so convenient and flexible. See SuperObject.

OTHER TIPS

It's quite common use use UTF-8 as the on-disk representation of Unicode data. In your code, use the Utf8String data type to hold data encoded that way so you remember that you'll need to convert it before using it in the rest of your application.

I use MSXML to store settings per user in a personal directory on the network. It should handle Unicode as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top