digitalmars.D.learn - The writeln() function's args can't be
- FrankLike (5/5) May 06 2014 Hi,everyone,
- JR (6/11) May 06 2014 The problem is that you have a wide-character comma (,) there.
- FrankLike (5/10) May 06 2014 No,I mean the execute result is error.That doesn't get the ["一",
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (6/18) May 06 2014 It works for me (Linux). If you're on Windows, it could have
- Regan Heath (13/34) May 06 2014 e.
- FrankLike (10/39) May 06 2014 No,it's error.My OS is windows 7,chcp 936. SimpleChinese.
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (10/21) May 06 2014 I don't know how go works but code page 936 is not Unicode. D's output
- FrankLike (9/15) May 06 2014 Thank you.
Hi,everyone, I find the The writeln() function's args can't be ["一" ,"二"]? why? Thank you. Frank.
May 06 2014
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(["一", "二"]); }
May 06 2014
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.
May 06 2014
On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote:It works for me (Linux). If you're on Windows, it could have something to do with Windows' handling of Unicode, but I don't know enough about that to help you. There were posts about this in this newsgroup, maybe you can find them, or someone else remembers and can tell you directly...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.
May 06 2014
On Tue, 06 May 2014 15:48:44 +0100, Marc Sch=C3=BCtz <schuetzm gmx.net> = wrote:On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote:e.The problem is that you have a wide-character comma (=EF=BC=8C) ther=", =This works: void main() { writeln(["=E4=B8=80", "=E4=BA=8C"]); }No,I mean the execute result is error.That doesn't get the ["=E4=B8=80=="=E4=BA=8C"],but get the ["=E6=B6=93C","=E6=B5=9C?]. Why? Thank you. Frank.It works for me (Linux). If you're on Windows, it could have something=to do with Windows' handling of Unicode, but I don't know enough about==that to help you. There were posts about this in this newsgroup, maybe==you can find them, or someone else remembers and can tell you directly=... IIRC you need to type "chcp 65001" and set the command prompt to the = Lucida font... R -- = Using Opera's revolutionary email client: http://www.opera.com/mail/
May 06 2014
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 <schuetzm gmx.net> wrote:No,it's error.My OS is windows 7,chcp 936. SimpleChinese. I use the 'go language' to test 'fmt.println("一, 二")' Then execute result is :一, 二. It's ok. But D is error:涓C,浜?. Why? Thank you. Frank.On Tuesday, 6 May 2014 at 13:35:57 UTC, FrankLike wrote:IIRC you need to type "chcp 65001" and set the command prompt to the Lucida font... RIt works for me (Linux). If you're on Windows, it could have something to do with Windows' handling of Unicode, but I don't know enough about that to help you. There were posts about this in this newsgroup, maybe you can find them, or someone else remembers and can tell you directly...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.
May 06 2014
On 05/06/2014 04:56 PM, FrankLike wrote:On Tuesday, 6 May 2014 at 15:03:11 UTC, Regan Heath wrote:I don't know how go works but code page 936 is not Unicode. D's output on the other hand, is Unicode.IIRC you need to type "chcp 65001" and set the command prompt to the Lucida font... RNo,it's error.My OS is windows 7,chcp 936. SimpleChinese. I use the 'go language' to test'fmt.println("一, 二")' Then execute result is :一, 二. It's ok.It means that the go program's output is in code page 936.But D is error:涓C,浜?.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
May 06 2014
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 AliThank you. I modify it by the 'Regedit'(my OS is windows 7 x64): open Regedit, find 'HKEY_CURRENT_USER\Console' find the CodePage,Double Click, then modify the type to 'decimal system',and modify the value to 65001. That's all. Thank you,everyone. Frank.
May 06 2014