[fpc-pascal] TStringHelper and Utf8String

Juha Manninen juha.manninen62 at gmail.com
Mon Aug 31 11:47:48 CEST 2026


Ondrej Pokorny via fpc-pascal kirjoitti 30.8.2026 klo 20.40:
>
> You don't need LazUTF8 anymore with recent FPC versions. FPC has 
> everything built-in. (I don't like Lazarus dependencies in console 
> applications.)
>
> Set these 3 CodePages to CP_UTF8:
>   SetMultiByteConversionCodePage(CP_UTF8);
>   SetMultiByteRTLFileSystemCodePage(CP_UTF8);
>   SetMultiByteFileSystemCodePage(CP_UTF8);
>
> and you are good to go.
>
LazUTF8 also sets callbacks on Windows for AnsiCompareStr(), 
AnsiCompareText() and similar functions.

I didn't know about the "winmanutf8lfn", I guess it does the same thing.

BTW, the Ansi...() functions have a misleading name. They actually work 
with Unicode.


Juha




More information about the fpc-pascal mailing list