Read a unicode character from the terminal
Jacob Carlborg
doob at me.com
Sun Apr 1 05:01:45 PDT 2012
On 2012-04-01 00:14, Stewart Gordon wrote:
> 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?
I'm using Mac OS X and the terminal is set to handle UTF-8.
> 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.
I'll have a look, thanks.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list