[fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 4 11:48:51 CEST 2016


On Mon, 4 Apr 2016 11:35:53 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

>[...]
> >> Then no conversions will be done for all ansistrings that contain UTF8.
> >
> > And this really means AnsiString, not AnsiString(something).
> 
> The latter cannot contain UTF8 unless you do some really nasty tricks... :-)

UTF8String is type AnsiString(CP_UTF8) and if you mix that with
AnsiString the compiler adds conversions code, because at compile time
CP_ACP is not UTF-8.
These kind of traps confuse people.

Mattias



More information about the fpc-pascal mailing list