On Fri, Aug 28, 2026 at 3:43 PM Bart <[email protected]> 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
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to