Asian characters are not printed propely in console
Vladimir Panteleev
vladimir at thecybershadow.net
Tue Jan 4 05:25:14 PST 2011
On Tue, 04 Jan 2011 11:47:32 +0200, Jun <blings at naver.com> wrote:
> Should I use different type and prefix or suffix similary to C++?
Place the following code anywhere at the top level in your program:
version(Windows)
{
import std.c.windows.windows : SetConsoleCP, SetConsoleOutputCP;
static this()
{
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
}
}
This code should really be in the standard library, I think.
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d-learn
mailing list