[fpc-devel] Trying to understand the wiki-Page "FPC Unicode support"

Sven Barth pascaldragon at googlemail.com
Wed Nov 26 12:09:47 CET 2014

Am 26.11.2014 11:53 schrieb "Michael Schnell" <mschnell at lumino.de>:
> On 11/26/2014 11:40 AM, Mattias Gaertner wrote:
>> Ansistring supports only one byte per character code pages.
> Even more confused. Am I wrong thinking that with code aware Strings,
for Delphi XE compatibility, in Windows CP_ACP needs to be UTF16 (if not
right, than due later) ?

Yes, you're wrong. In Delphi (and FPC) CP_ACP corresponds by default with
the current system codepage (e.g. CP1252 on a German Windows). CP_UTF16 is
not supported, because AnsiString only supports 1-Byte character strings
(and UTF-8 as the odd one) and not 2-Byte character strings.
The difference to Delphi currently is that for FPC
String=AnsiString(CP_ACP) and for Delphi String=UnicodeString (aka 2-Byte

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141126/c24b93db/attachment.html>

More information about the fpc-devel mailing list