Asian characters are not printed propely in console

Jonathan M Davis jmdavisProg at gmx.com
Mon Jan 3 19:50:31 PST 2011


On Monday 03 January 2011 19:39:00 Jun wrote:
> This is my code.
> 
> 1.///////////////////////////
> import std.stdio;
> import std.process;
> 
> void main(string[] args)
> {
> 	writeln("安寧");
> 	system("pause");
> }
> 
> 2.////////////////////////
> import std.stdio;
> import std.process;
> 
> void main(string[] args)
> {
> 	writeln("안녕");
> 	system("pause");
> }
> 
> Results are...
> 1.///////////////////////////
> 若됧?
> 계속하려면 아무 키나
> 누르십시오... 2./////////////////////////
> ?덈뀞
> 계속하려면 아무 키나
> 누르십시오...
> 
> The attached file is screenshot of test 2.
> 
> (string values typed by user did not caused problem)
> 
> Please confirm this problem and let me know whether this is the problem of
> dmd.

Please don't post to the bug list. It's really only meant for messages from 
bugzilla. You sign up for it if you want to see all of the bugzilla messages 
from when bugs are added or commented on or whatnot. Post on D.learn for 
questions about learning D and on D for discussions on the language and its 
development. This question should probably go on D.learn.

I'm not all that well versed in how you put unicode in your strings (rather than 
getting strings that have unicode in them from elsewhere - like user input), but 
my guess would be that you're not declaring your strings correctly, so they're 
not being treated as unicode. If you repost this on D.learn, odds are that 
someone there will know what you're doing wrong or perhaps even confirm that this 
is a dmd bug if that's really what's going on.

- Jonathan M Davis


More information about the Digitalmars-d-bugs mailing list