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

Regan Heath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 6 08:03:09 PDT 2014


On Tue, 06 May 2014 15:48:44 +0100, Marc Schütz <schuetzm at 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 error.That doesn't get the ["一",  
>> "二"],but get the ["涓C","浜?].
>>
>> 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/


More information about the Digitalmars-d-learn mailing list