Bug 15761 – Windows wide character console output broken with MS runtime

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-03-04T21:51:09Z
Last change time
2024-12-01T16:26:10Z
Assigned to
No Owner
Creator
Martin Krejcirik
See also
https://issues.dlang.org/show_bug.cgi?id=15845, https://issues.dlang.org/show_bug.cgi?id=1448, https://issues.dlang.org/show_bug.cgi?id=2742, https://issues.dlang.org/show_bug.cgi?id=24001
Moved to GitHub: phobos#10164 →

Comments

Comment #0 by mk — 2016-03-04T21:51:09Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10164 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB