[fpc-pascal] Unicode chars losing information

Ryan Joseph genericptr at gmail.com
Sun Mar 7 18:21:06 CET 2021



> On Mar 7, 2021, at 10:11 AM, Marco van de Voort via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> 
> Yes it is. And there are about 1114000 unicode codepoints, or about 17 times what fits in a 2-byte wide char.
> 
> https://en.wikipedia.org/wiki/Code_point
> 
> https://en.wikipedia.org/wiki/UTF-16

I thought unicode strings "just worked" but maybe that's UTF-8 and the character I want is maybe UTF-16. What are you supposed to do then? UnicodeString knows how to print the full string so all the data is there but I can't index to get characters unless I know their size.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list