Windows console is broken

Sergey Gromov snake.scaly at gmail.com
Wed Jan 30 15:30:48 PST 2008


Sorry to mention it again, but it is.

If a command-line argument to a D program contains a non-ascii character, that argument doesn't get into main().  This happens even if console code page is 65001.  This is most annoying because it cannot be worked around.

The standard output does not work with non-utf8 consoles.  But console code page is national/traditional by default.  To make writeln() work, you must switch to 65001 codepage AND change to a console font which supports unicode, which means you're stuck with Lucida Console.  Not a perfect solution, especially if a tool is developed for use by other people.

All in all, when it comes to simple utilities, I just put D aside and switch to batch/C/perl/whatever.  As it said in Phobos's Philosophy, "Simple Operations should be Simple."  I don't need a standard output that doesn't work.

SnakE



More information about the Digitalmars-d mailing list