Op 2021-03-07 om 17:21 schreef Ryan Joseph via fpc-pascal:
I came across a bug which was caused but a unicode character losing information 
and narrowed it down to this. Why doesn't the chars[1] print the same character 
as appeared in the string?

var
   chars: UnicodeString;
begin
   chars := '⌘⌥⌫⇧^';
   writeln(chars);
   writeln(chars[1]);
end.

Prints:

⌘⌥⌫⇧^
?

Probably it is not in the BMP and thus needs more position than one.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to