[fpc-pascal] TStringHelper and Utf8String
Bart
bartjunk64 at gmail.com
Fri Aug 28 18:08:36 CEST 2026
On Fri, Aug 28, 2026 at 3:43 PM Bart <bartjunk64 at gmail.com> wrote:
> As expected?
> In the Utf8String 'f' will be at index 3, since the 'ä' will take up 2
> bytes in UTF8-encoding.
Seems I'm wrong.
IndexOf() is zero-based, so 2 is indeed the correct value.
I would have expected/feared that casting to String() would trigger a
codepage conversion to CP_ACP, which is a 1-byte encoding by default
on Windows at least.
--
Bart
More information about the fpc-pascal
mailing list