[Issue 1448] UTF-8 output to console is seriously broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 3 08:57:25 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1448
------- Comment #6 from mk at krej.cz 2008-09-03 10:57 -------
I hope this gets fixed one day. Here is an updated example, where it still
doesn't work (for stderr, stdout is ok) as of DMD 1.035
import std.c.stdio;
import std.c.windows.windows;
extern(Windows) export BOOL SetConsoleOutputCP( UINT );
void main() {
SetConsoleOutputCP( 65001 ); // or use "chcp 65001" instead
// Codepoint 00e9 is "Latin small letter e with acute"
fputs("Output utf-8 accented char \u00e9\n... and the rest is OK\n",
stdout);
fputs("Output utf-8 accented char \u00e9\n... and the rest is cut off!\n",
stderr);
fputs("STDOUT.\n", stdout);
fputs("STDERR.\n", stderr);
}
--
More information about the Digitalmars-d-bugs
mailing list