[fpc-pascal] TStringHelper and Utf8String
Ondrej Pokorny
lazarus at kluug.net
Sun Aug 30 19:40:56 CEST 2026
Am 30.08.2026 um 18:05 schrieb Juha Manninen via fpc-pascal:
> On 8/30/26 5:03 PM, Thomas Kurz via fpc-pascal wrote:
>> That is interesting and exactly what I'd like to have. How can I do that?
>
> It is enabled automatically in LCL GUI apps. In a console program you
> must add unit *LazUTF8* to uses section. That's all.
>
> See: https://wiki.lazarus.freepascal.org/Unicode_Support_in_Lazarus
>
> for details.
>
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.
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20260830/e648357c/attachment.htm>
More information about the fpc-pascal
mailing list