[fpc-pascal] TStringHelper and Utf8String
Ondrej Pokorny
lazarus at kluug.net
Mon Aug 31 11:54:01 CEST 2026
On 8/31/2026 11:47 AM, Juha Manninen via fpc-pascal wrote:
> 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.
If I am not mistaken, they are not needed anymore. FPC 3.x handles it. A
lot of the UTF-8 stuff in Lazarus could be cleaned up as it was written
for FPC 2.x.
Ondrej
More information about the fpc-pascal
mailing list