Re: [twsocket] Proposal to replace TIniFile by TRegIniFile in all
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
[twsocket] Proposal to replace TIniFile by TRegIniFile in all v7 demo applications
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? -- Arno Garrels -- 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
Re: [twsocket] Proposal to replace TIniFile by TRegIniFile in all v7demo applications
Arno Garrels wrote: how would you manually maintain, for example, a UTF-8 file name? OK, notepad could do the trick ;-) 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? -- Arno Garrels -- 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
Re: [twsocket] Proposal to replace TIniFile by TRegIniFile in all v7 demo applicati
Since Delphi and ICS goes Unicode I suggest to replace TIniFile by TRegIniFile in all demo applications. The demo INI files normally only hold form positions, tick boxes, etc, rarely anything that needs to be stored in Unicode. The demos also need to remain compatible with D7. 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. Using the registry with Vista is trouble due to key remapping and permissions, I've reverted to using INI files for new applications. Ideally INI files should be stored in the user tree, but these are development samples so the program directory is OK. Angus -- 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
Re: [twsocket] Proposal to replace TIniFile by TRegIniFile in all v7 demo applications
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. None of my programs is allowed to use the registry. Regards from Germany Franz-Leo -- 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
Re: [twsocket] Proposal to replace TIniFile by TRegIniFile in all v7 demo applications
Scrive Arno Garrels [EMAIL PROTECTED]: 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'm against to write into the registry from a demo application. I agree with Angus points. As work around, can you transform the unicode strings to UTF-8 before write it into the ini file? Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- 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