This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling strings with nonascii chars.


According to Andy Koppe on 1/25/2010 10:53 PM:
>> let _ = print_DEBUG "Fin du chargement dynamique Ãventuel"
>>
>>
>> I have done some testing and it looks like I get an error on any string literal which contains non-ascii chars.

> This might be a case of the source being
> encoded in ISO-8859-1 while the compiler tries to interpret it as
> UTF-8.

Another thing to consider - use escape sequences (octal or hex) rather
than literal characters, to make your source file ASCII-only; this has the
benefit of making the encoding of the character literal independent of the
encoding of the compiler, so your code is portable to other machines where
the compiler is run with a different locale.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]