[fpc-devel] String and UnicodeString and UTF8String
LacaK
lacak at zoznam.sk
Mon Jan 10 12:57:23 CET 2011
> AFAIK, in current Delphi (which I don't have) a "String" is a variable
> that can contain dynamically coded informations (such as locally
> coded 8-Bit ANSI, UTF-8, UTF-16, ...) and - of course - know which
> code it holds.
I understand "By default, variables declared as type String are
*UnicodeString*.**", that String=UnicodeString
See: http://docwiki.embarcadero.com/VCL/en/System.UnicodeString
and also
http://docwiki.embarcadero.com/RADStudio/en/String_Types#UnicodeString
Note alse, that AnsiString holds additional informations about character
encoding:
"The AnsiString
<http://docwiki.embarcadero.com/VCL/en/System.AnsiString> structure
contains a 32-bit length indicator, a 32-bit reference count, a 16-bit
data length indicating the number of bytes per character, and a 16-bit
code page."
-Laco.
>
> If a string is generated by the VCL from a Window API function, the
> coding will be UTF-16, though, but if you create a string with some
> other coding it will be automatically re-coded to UTF16 before sending
> it into a Windows API function.
>
> -Michael
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110110/bfa54411/attachment.html>
More information about the fpc-devel
mailing list