import std.stdio, core.sys.windows.windows;
void main()
{
SetConsoleOutputCP(65001);
writeln("1 ááá");
writeln("2 ááá"w); // broken with -m32mscoff and -m64
writeln("3 ááá"d); // broken with -m32mscoff and -m64
}
Comment #1 by mk — 2016-03-05T02:23:56Z
OK, after some experimenting, at looks like even UTF8 has serious problems (ErrnoException from Phobos), is it really so much broken on Windows ?
Comment #2 by bugzilla — 2023-06-22T08:23:07Z
It works with -m32 (the 32 bit OMF output)
Comment #3 by bugzilla — 2023-06-22T08:42:11Z
This C program works with 64 bit Windows VC:
-------------------------
#include <windows.h>
#include <stdio.h>
#include <wchar.h>
void main()
{
fwprintf(stdout, L"Helláá LDC\n");
fflush(stdout);
}
--------------------------
So there's definitely something wrong with the Microsoft version code in std.stdio.
This is on Windows 7.
Comment #4 by bugzilla — 2023-06-22T08:45:22Z
That program also works with Digital Mars C.
Comment #5 by robert.schadek — 2024-12-01T16:26:10Z