digitalmars.D.bugs - [Issue 18801] New: std.stdio.File doesn't work with MSVCRT's UTF-8
- d-bugmail puremagic.com (31/31) Apr 26 2018 https://issues.dlang.org/show_bug.cgi?id=18801
https://issues.dlang.org/show_bug.cgi?id=18801 Issue ID: 18801 Summary: std.stdio.File doesn't work with MSVCRT's UTF-8 mode Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: ag0aep6g gmail.com test.d: ---- import std.file: readText; import std.stdio: File; import std.string: stripLeft; void main() { { auto f = File("test.txt", "w,ccs=UTF-8"); f.write("foo"); } assert(readText!string("test.txt").stripLeft("\uFEFF") == "foo"); } ---- Crashes on Windows when compiled with -m32mscoff or -m64. std.stdio tries using fputc which doesn't work in Microsoft's Unicode mode. I'm going to try and fix this. --
Apr 26 2018