Improving D's support of code-pages
Anders F Björklund
afb at algonet.se
Sun Aug 19 23:40:53 PDT 2007
Sean Kelly wrote:
>> It was my understanding that D by design only supports UTF environments,
>> and the behaviour on legacy systems (CP437/ISO-8859-1) is "undefined"...
>> It's not only output, if you run on a such a system and try to read the
>> args (char[][]) you can get an UTF exception due to it being malformed.
>
> Tango converts the input args to UTF-8 on Win32 rather than just
> accepting them as they are.
Sorry, I was talking about Phobos. Another library difference, I guess.
> The args are left alone on Unix however,
> because most Unix consoles seem to use Unicode anyway.
On Mac OS X it defaults to MacRoman, but you can change it to ISO-8859-1
or UTF-8 with the flick of a menu... (Display > Character Set Encoding)
I even heard rumors of a Windows command to do the same... (chcp 65001)
But I also heard it could lead to problems with some DOS batch files ?
--anders
More information about the Digitalmars-d
mailing list