Read a unicode character from the terminal

Stewart Gordon smjg_1998 at yahoo.com
Sat Mar 31 15:14:51 PDT 2012


On 31/03/2012 16:56, Jacob Carlborg wrote:
> How would I read a unicode character from the terminal? I've tried using
> "std.cstream.din.getc" but it seems to only work for ascii characters. If I try to read
> and print something that isn't ascii, it just prints a question mark.

What OS are you using?

And what codepage is the console set to?

You might want to try the console module in my utility library:

http://pr.stewartsplace.org.uk/d/sutil/

(For D1 at the moment, but a D2 version will be available any day now!)

Stewart.


More information about the Digitalmars-d-learn mailing list