utf-8?

Denis Koroskin 2korden at gmail.com
Tue Mar 17 17:07:02 PDT 2009


On Wed, 18 Mar 2009 02:34:49 +0300, Gide Nwawudu <gide at btinternet.com> wrote:

> On Tue, 17 Mar 2009 10:48:56 -0400, Steve Teale
> <steve.teale at britseyeview.com> wrote:
>
>> import std.stdio;
>>
>> void main()
>> {
>>   string s = "Die Walküre";
>>   writefln(s);
>> }
>>
>> Gives error - invalid utf-8 sequence. I pasted the text from a Wiki  
>> page that claims to be utf-8. What's happening?
>
> Works for me, you should save the file as UTF-8 and set your codepage
> to 65001.
> C:\> dmd test.d
>
> C:\> test
> Die Walk+?re
>
> C:\>chcp 65001
> Active code page: 65001
>
> C:\>test
> Die Walküre
>
> Gide

I believe Phobos should do it manually.




More information about the Digitalmars-d mailing list