How to print unicode like: こ ん に ち は 世 界

Matthew Ong ongbp at yahoo.com
Thu May 19 08:22:15 PDT 2011


Hi,

import std.stdio;
alias immutable(wchar)[] String;
String str="Hello, world; or Καλημέρα κόσμε; or こんにちは 世界";
writeln(str); // It prints garbage on console.

In Java and Go, that just works. I believe UTF-X is handles that.

How to do that within D?

Yes. I am still new to D. No. I am not japanese but chinese.


Matthew Ong



More information about the Digitalmars-d-learn mailing list