On Monday, 10 October 2016 at 19:31:14 UTC, Cleverson Casarin Uliana wrote:
Hi Martin, indeed, here in my workplace Windows machine there is no "CP_UTF_8" codepage, nor there is 65001. I was waiting to

codepage 65001 (UTF8) should be available on all modern Windows. You can try command cp 65001 in the console window (and change your font accordingly).

Just for info, this is probably a d related bug, because the Racket language for example has a (reencode-output-port) function, and it Works.

I don't know know about Racket, but D's problems are related to the C runtime library. Here is what I found out:

-m32 (uses DM C library): output to stdout works, but stderr is broken (corrupt accented characters, or total output freeze).
https://issues.dlang.org/show_bug.cgi?id=1448

-m32mscoff and -m64 (Microsoft C runtime): broken characters and some mysterious failures.
https://issues.dlang.org/show_bug.cgi?id=15761

So this leaves transcoding as the only viable solution. Luckily, there is std.windows.charset.toMBSz function you can use.

Reply via email to