D - dmd bugs on string
- jmchxy 163.com (19/19) Apr 21 2005 help me!
-
Thomas Kuehne
(5/7)
Apr 21 2005
- Walter (3/19) May 22 2005 Use writef, rather than printf. writef will write UTF-8 strings properly...
help me! I'm a Chinese programmer, a C++ programmer and a new member for D. bugs: /* hello.d */ int main(char[][] args) { printf("ÄãºÃ!\n"); return 0; } save as ascii or utf8: dmd output: hello.d(3): invalid UTF-8 sequence hello.d(3): invalid UTF-8 sequence hello.d(3): invalid UTF-8 sequence if save as Unicode, dmd ok! but run hello.exe and output is error. how to use chinese string in d source jmchxy 163.com
Apr 21 2005
jmchxy 163.com schrieb am Thu, 21 Apr 2005 12:34:44 +0000 (UTC):help me! I'm a Chinese programmer, a C++ programmer and a new member for D.<snip> this newsgroup is deprecated use digitalmars.D or digitalmars.D.learn Thomas
Apr 21 2005
<jmchxy 163.com> wrote in message news:d486l4$2vg4$1 digitaldaemon.com...bugs: /* hello.d */ int main(char[][] args) { printf("ÄãºÃ!\n"); return 0; } save as ascii or utf8: dmd output: hello.d(3): invalid UTF-8 sequence hello.d(3): invalid UTF-8 sequence hello.d(3): invalid UTF-8 sequence if save as Unicode, dmd ok! but run hello.exe and output is error. how to use chinese string in d sourceUse writef, rather than printf. writef will write UTF-8 strings properly. printf is C's printf, which doesn't handle UTF-8.
May 22 2005