Chinese characters display correctly under 936 after using the Function CharToOemW
sdvcn via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 17 01:18:29 PDT 2014
On Saturday, 17 May 2014 at 07:59:57 UTC, FrankLike wrote:
>
>
>
>>> I mean not use conv by us,writeln(”中文”),then ok.
>>> Thank you.
>>
>> import core.stdc.string;
>> char[] s2 = (toMBSz(s1)[0 .. strlen(toMBSz(s1))]).dup;
>> writeln(s2);
>
> I mean only writeln(s1),transform inside.
>
> Thank you.
windows Console Support mbs, ansi, Unicode. not support utf8
"s1" is utf8
"cmd /a" ansi
"cmd /u" Unicode
page code 936 is gbk,
s1 Convert gbk Print
or
page code set "65001" for utf8 fix font to "Lucida Sans Unicode"
or
s1 to utf16 "cmd /u"
More information about the Digitalmars-d
mailing list