2

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.

sth
  • 222,467
  • 53
  • 283
  • 367
migajek
  • 8,524
  • 15
  • 77
  • 116
  • michal, you're making an IDE aren't you. you're repeating all those questions i had in mind before :) – utku_karatas Sep 14 '09 at 17:02
  • I'm :) well those are the questions I had for a long time... previously I solved them on my own but in this kind of way I would'nt like to repeat... ;) – migajek Sep 14 '09 at 19:51
  • @utku, is there a way to contact you? for further discussion I'd like to mail you if possible, try contacting me at my gmail box, username is migajek ;) [preventing spam bots ;) ] – migajek Sep 14 '09 at 19:54

3 Answers3

2

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

utku_karatas
  • 6,163
  • 4
  • 40
  • 52
  • That is not really what I looked for. I'm looking for something to load/save the object, using RTTI. – migajek Sep 14 '09 at 18:46
1

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.

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
0

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

Roland Bengtsson
  • 5,058
  • 9
  • 58
  • 99