[fpc-devel] Performance of string handling in trunk
Marco van de Voort
marcov at stack.nl
Thu Jun 27 13:48:01 CEST 2013
In our previous episode, Michael Schnell said:
> As I don't have a new Delphi I in turn don't know what exactly
> "UnicodeString" means.
utf16 as has been said hundreds of times, and can be seen in thousands of
locations on the web. If you don't get these essential features, then all
this discussion is useless.
> From what I read I assume this means "System Encoding" and this again
> means UTF-16 or UCS2.
That's a bad term. Windows has THREE system encodings. One, OEM for legacy
console, one (called ANSI) for 1-byte types, and "UNICODE" which means UTF16
(UCS2 on NT4 and Win2000)
> And if all this is true, when storing a - say UTF-8 - String in a
> stringlist and retrieving it later to a String variable with encoding
> type UTF-8 a dual conversion is done.
> To me this seems absolutely silly.
Correct. Using UTF8 on Windows is silly, as it is not a native string type,
and is never used by default.
More information about the fpc-devel