If you're on Windows, you need to set the proper codepage for the
console, you can do it programmatically like so:
version(Windows)
{
import std.c.windows.windows;
extern(Windows) BOOL SetConsoleOutputCP(UINT);
}
void main()
{
version(Windows) SetConsoleOutputCP(65001);
writeln("Hello, world; or Καλημέρα κόσμε; or こんにちは 世界");
}
You would also need a Unicode-aware font, maybe Lucida or something
similar. Typically fixed-point fonts used for programming have little
support for Unicode characters, and you would get back a black or
white box like "[]".
On 5/19/11, Andrej Mitrovic <[email protected]> wrote:
> Which OS?
>