Windows console is broken
Lars Noschinski
lars-2006-1 at usenet.noschinski.de
Fri Feb 1 05:27:11 PST 2008
* Sean Kelly <sean at f4.ca> [08-01-31 21:42]:
>Janice Caron wrote:
>> On 1/31/08, Sergey Gromov <snake.scaly at gmail.com> wrote:
>> So there would be two possible fixes. Either (1), allow main to have a signature
>>
>> main(ubyte[][] args)
>>
>> thereby allowing any encoding, or (2) have the D runtime convert the
>> shell arguments from the console's local encoding to UTF-8 before
>> passing to main.
>
>Tango does (2) on Windows. This doesn't appear to be a problem on other
>OSes however, because the consoles there can typically be set to use
>UTF-8. As far as I know it's just Windows that's in the stone age.
I'd think something like (1) is needed, too: E.g. Unix paths are
encoding agnostic (just a stream of bytes excluding '\0'). So to
implement for example a POSIX conforming cp command, you need a way to
get the raw, binary command line arguments.
More information about the Digitalmars-d
mailing list