Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread JR via Digitalmars-d-learn
On Tuesday, 6 May 2014 at 09:43:10 UTC, FrankLike wrote: Hi,everyone, I find the The writeln() function's args can't be [一 ,二]? why? Thank you. Frank. The problem is that you have a wide-character comma (,) there. This works: void main() { writeln([一, 二]); }

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread FrankLike via Digitalmars-d-learn
The problem is that you have a wide-character comma (,) there. This works: void main() { writeln([一, 二]); } No,I mean the execute result is error.That doesn't get the [一, 二],but get the [涓C,浜?]. Why? Thank you. Frank.

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread via Digitalmars-d-learn
On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote: The problem is that you have a wide-character comma (,) there. This works: void main() { writeln([一, 二]); } No,I mean the execute result is error.That doesn't get the [一, 二],but get the [涓C,浜?]. Why? Thank you. Frank.

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread Regan Heath via Digitalmars-d-learn
On Tue, 06 May 2014 15:48:44 +0100, Marc Schütz schue...@gmx.net wrote: On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote: The problem is that you have a wide-character comma (,) there. This works: void main() { writeln([一, 二]); } No,I mean the execute result is

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread FrankLike via Digitalmars-d-learn
On Tuesday, 6 May 2014 at 15:03:11 UTC, Regan Heath wrote: On Tue, 06 May 2014 15:48:44 +0100, Marc Schütz schue...@gmx.net wrote: On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote: The problem is that you have a wide-character comma (,) there. This works: void main() {

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread Ali Çehreli via Digitalmars-d-learn
On 05/06/2014 04:56 PM, FrankLike wrote: On Tuesday, 6 May 2014 at 15:03:11 UTC, Regan Heath wrote: IIRC you need to type chcp 65001 and set the command prompt to the Lucida font... R No,it's error.My OS is windows 7,chcp 936. SimpleChinese. I use the 'go language' to test I don't know

Re: The writeln() function's args can't be [一 ,二]?

2014-05-06 Thread FrankLike via Digitalmars-d-learn
That is understandable: Since the console is set to 936, it interprets D program's UTF-8 output incorrectly. Please do what Regan Heath says and test again: 1) Set the code page to 65001 2) Use a font that includes your Unicode characters Ali Thank you. I modify it by the 'Regedit'(my