[fpc-devel] Save the current FPC UnicodeString!

Michael Schnell mschnell at lumino.de
Fri Nov 13 10:16:46 CET 2009

Florian Klaempfl wrote:
> Well, I guess you're talking about lazarus ;) I don't see yet however,
> if and how the ansistring abuse in the lcl will bite one ...

Why should the (future) lcl use "ANSIString". I suppose using ANSIString
for UTF-8 data was just a nasty hack to do Unicode with the _current_
FPC. (In contrast the MSE-GUI hack was using Widestring, which is less
ambiguous and seems to work better on Windows, but needs more
conversions on Linux.)

Of course the future LCL should use the dynamically encodes strings to
allow for using utf-16 on Windows and utf-8 on Linux with the same
source code. There should be appropriate means to define the string
constants (in the LCL and in the user program) to be stored so that
conversions are avoided (maybe on Linux, for optimization, the user
would need to have the string constants meant for the GUI saved as UTF-8
and those meant for database handling in utf-16 <I'm quite illiterate
with db-programming> ).


More information about the fpc-devel mailing list