How to correctly display accented characters at the Windows prompt?
Martin Krejcirik via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Oct 10 12:51:49 PDT 2016
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.
More information about the Digitalmars-d-learn
mailing list