Thread overview | |||||
---|---|---|---|---|---|
|
February 08, 2015 How to write asia characters on console? | ||||
---|---|---|---|---|
| ||||
Hi, My first D program is like this: ----------------------------------- import std.stdio; void main(string[] args) { dstring s1 = "hello你好"d; writeln(s1); } ----------------------------------- But the output is not correct(and my console codepage is 936): C:\D\dmd2\samples\d>dmd hello.d -offilename hello.exe C:\D\dmd2\samples\d>hello.exe hello浣犲ソ thanks. |
February 11, 2015 Re: How to write asia characters on console? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lave Zhang | On Sunday, 8 February 2015 at 05:56:22 UTC, Lave Zhang wrote:
> Hi,
>
> My first D program is like this:
> -----------------------------------
> import std.stdio;
>
> void main(string[] args)
> {
> dstring s1 = "hello你好"d;
> writeln(s1);
> }
> -----------------------------------
> But the output is not correct(and my console codepage is 936):
>
> C:\D\dmd2\samples\d>dmd hello.d -offilename hello.exe
> C:\D\dmd2\samples\d>hello.exe
> hello浣犲ソ
>
> thanks.
I just tried this on my Mac(utf8) and it worked as expected. I see that you are using Windows, I'm not near a Win* machine right now, but can check later.
|
February 11, 2015 Re: How to write asia characters on console? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lave Zhang | https://issues.dlang.org/show_bug.cgi?id=2742 |
Copyright © 1999-2021 by the D Language Foundation