[Lazarus] UTF8 issue

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Sep 7 19:08:49 CEST 2016


On Wed, 7 Sep 2016 18:31:59 +0200
Giuliano Colla <giuliano.colla at fastwebnet.it> wrote:

> Il 07/09/2016 15:08, Mattias Gaertner ha scritto:
> > FPC does not use your LANG variable. Instead it always assumes
> > ISO-8859-1. See here:  
> 
> I could swallow it more easily if it were the opposite, i.e. the String 
> type is misinterpreted and UTF8String is properly handled.
> 
> But what happens is that the String type is handled correctly, while 
> UTF8String is not. IOW the compiler is told what to expect from a string 
> and it messes it up.
> 
> Moreover calling   SetMultiByteConversionCodePage(CP_UTF8) at program 
> startup doesn't change a thing: String type is correct, UTF8String type 
> is wrong.
> 
> fpc bug?

This has become a FAQ:

http://wiki.lazarus.freepascal.org/Better_Unicode_Support_in_Lazarus#Why_does_UTF8String_show_strange_characters_and_String_works


Mattias


More information about the Lazarus mailing list