On 5/3/2009 7:41 AM, Georg Wrede wrote:
Tyro[a.c.edwards] wrote:
I'm on a Japanese system attempting to input/output Japanese Characters
and cannot seem to accomplish it. How would I read
"憲法記念日 理念と現実、広がる格差" from stdin/file and output the
same to stdout/file?

import std.stdio;

void main()
{
auto lin = readln();
writeln(lin);
}

Works with your Japanese strings. It just works(tm).

Interesting... for whatever reason I thought I had to cast/convert
to!dstring in order to get the correct output. Which kept resulting in:

 std.utf.UtfException: 4invalid UTF-8 sequence

thank you very much.

Reply via email to