Exceptions don't print Unicode characters under Windows console using chcp 65001. Maybe it's related to:
http://d.puremagic.com/issues/show_bug.cgi?id=1448
import std.stdio;
void main()
{
writefln("test_\u00E1_end");
throw new Exception("test_\u00E1_end");
}
Output:
test_á_end //correct
Error: test_ //cut-off
Comment #1 by smjg — 2007-10-29T08:22:03Z
It appears that issue 1448 was fixed for stdout but strangely not for stderr. But what happens on mine (DMD 1.022, Windows Vista) is different:
import std.stdio;
void main()
{
writefln("writefln: test_\u00E1_end");
fwritefln(stdout, "stdout: test_\u00E1_end");
fwritefln(stderr, "stderr: test_\u00E1_end");
throw new Exception("test_\u00E1_end");
}
writefln: test_á_end
stdout: test_á_end
stderr: test_��_end
Error: except: test_��_end
(In the last two cases I get squares - they seem to display as question marks in some fonts.)
Comment #2 by mk — 2007-10-29T11:04:25Z
*** This bug has been marked as a duplicate of 1448 ***