Hello!

> Hi,

> Since Delphi and ICS goes Unicode I suggest to replace
> TIniFile by TRegIniFile in all demo applications.
> TInifile uses Win32 API functions which do not support
> Unicode, any string is converted to ANSI implicitly.
> TMemIniFile won't be a solution since Delphi 2009 UPD 1 
> did not fix a bug with UTF-8, even if TMemIniFile was able
> handle UTF-8 correctly, how would you manually maintain, 
> for example, a UTF-8 file name?
> So I suggest to use the registry with a key under HKCU 
> Software\FPiette\ICS\Demos\ instead, thast would resolve
> problems with UAC in Vista as well.

> What do you think?

I didn't follow the thread, but in my opinion, the easiest and the least
"enterprisey" solution could be encoding to UTF-8 all values passed to
WriteString and decoding from UTF-8 all values obtained by ReadString.
No need to switch to TRegIniFile or (DOH!) XML files.

For example:

        IniFile.WriteString('Settings', 'LastFile', UTF8Encode(filename));

        filename:=UTF8Decode(IniFile.ReadString('Settings', 'LastFile', ''));

-- 
Piotr Dałek
[EMAIL PROTECTED]

----------------------------------------------------------------------
Konkurs! Wygraj telewizor LCD!
Sprawdz >> http://link.interia.pl/f1f61

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to