[fpc-pascal] Funny things about utf-8 strings on mac

Florian Klaempfl florian at freepascal.org
Tue Jun 12 10:54:31 CEST 2007


Felipe Monteiro de Carvalho schrieb:
>> The default code page used by FPC is 8859-1. However, the scanner
>> detects the UTF-8 marker if present, and when it finds it then it
>> switches the code page to UTF-8. You can also set the code page
>> manually to UTF-8 using {$codepage utf-8}.
> 
> Why does the codepage matter in this case? I would imagine that FPC
> just reads my string as a bunch of bytes... fpc doesn't need to
> perform any operations with it.

The compiler takes care of the codepage when reading string constants as
widestrings.



More information about the fpc-pascal mailing list