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

Florian Klaempfl florian at freepascal.org
Wed Jun 13 14:21:07 CEST 2007


Jonas Maebe schrieb:
> 
> On 13 jun 2007, at 13:33, Felipe Monteiro de Carvalho wrote:
> 
>> changing on my program from strint to utf8string didn't make any
>> difference. The string is ok when I don't have BOM and is wrong with a
>> BOM
> 
> I've in the mean time discovered that nl_langinfo always returns
> US-ASCII (or an empty string) under Darwin, regardless of what your
> LANG/LC_* settings are. Forcing it to utf-8 fixes some problems, but
> there is another error in the generic code for writing a widestring. I'm
> fixing that currently.

If MacOSX uses always utf-8 for 8 bit strings, you can hardcode it of
course in cwstrings and don't use iconv.



More information about the fpc-pascal mailing list