[fpc-pascal] Unicode chars losing information

Ryan Joseph genericptr at gmail.com
Sun Mar 7 17:21:34 CET 2021


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:

⌘⌥⌫⇧^
?


Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list