|
From: | Sam Varshavchik |
Subject: | Portable way to accept unicode keyboard input |
Date: | Fri, 25 Feb 2011 06:51:42 -0500 |
So I'm reading my wchar_ts from get_wch(), and my application uses unicode to throw text strings around. If wchar_t is not guaranteed to be UCS-4, then I'm trying to figure out what's the most portable way to convert keyboard input to unicode.
The first thing that came to mind was use wcrtomb() to convert wchar_ts to a multibyte sequence, then stack iconv() on top of that, and end up with UCS-4 values that way. But if I need to do that, shouldn't I just be able to read the same multibyte sequence with getch(), instead?
Basically -- what's the most portable approach to reading unicode values from the keyboard?
pgp6GCmrd9Ofl.pgp
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |