Chinese characters in a string(GDC)

Julio César Carrascal Urquijo jcesar at phreaker.net
Tue May 15 10:46:32 PDT 2007


ryuka wrote:
> Hey , I 'm a chinese d users , My d compiler (gdc) can't work well when using a string contains chinese characters . 
> when I type "ÄúºÃ" or "ÄúºÃ"w in my source code as a wchar [] , My gdc display some compile error message as below:
> hello.d:33: invalid UTF-8 sequence
> hello.d:33: invalid UTF-8 sequence
> hello.d:33: invalid UTF-8 sequence
> hello.d:33: invalid UTF-8 sequence
> :: === Build finished: 4 errors, 0 warnings ===
> I don't know if dmd has the same problem , but in gdc I can't find a way to type chinese characters into a wchar [] .I don't want  to use hex values.so I came here for some help
> thanks 

You should save your source code as either UTF-8, UTF-16 or UTF-32 (with 
signature).



More information about the Digitalmars-d mailing list