Chinese characters in a string(GDC)
Roberto Mariottini
rmariottini at mail.com
Tue May 15 08:15:26 PDT 2007
ryuka wrote:
[...]
> Anyway ,I try to change the code page to pthers.However ,When the d source stored in some other code pages , the compiler works well (no compile errors ) but my application display strange characters which aren't the characters I type in the source .. and g++ programs display these strange characters too when using these code pages .So there is still a problem about using chinese on my os.
The problem is that the current D console API doesn't translate form
internal Unicode representation to the codepage currently selected in
your console.
So, even if you write your source as UTF-something (so the compiler can
understand it) when you call writef (or printf or the like) it will not
translate back those UTF sequences to the console codepage, so you'll
get messed up characters on the screen.
This makes D console programs currently unusable for any language other
than English.
Ciao
More information about the Digitalmars-d
mailing list