[Lazarus] UTF8String and UTF8Delete

Bart bartjunk64 at gmail.com
Sun Dec 13 12:46:40 CET 2015


On 12/13/15, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:

>> If you write a program in Lazarus which uses the LCL (which in turn
>> uses LazUtils) then this is done for you by the LazUtils package at
>> initialization of the fpcadds unit.
>
> To be exact: It is the unit LazUTF8 of package LazUtils that sets
> the UTF-8 in the RTL.

{$mode nitpicking}

LauUtf8 unit sets (amongst others) some WideStringManager methods.

FPCAdds unit sets DefaultSystemCodePage to CP_UTF8:

{$ifdef UTF8_RTL}
initialization
  SetMultiByteConversionCodePage(CP_UTF8);
  // SetMultiByteFileSystemCodePage(CP_UTF8); not needed, this is the
default under Windows
  SetMultiByteRTLFileSystemCodePage(CP_UTF8);
{$IFEND}

Bart




More information about the Lazarus mailing list