By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,604 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,604 IT Pros & Developers. It's quick & easy.

Need help in reading input from the console using a vc application -unicode

P: 1
Hi All,
I have built a win32 coonsole application. It works fine with _MBCS/MBCS settings.. On changing it to unicode, i face the following problem.

If it is Unicode, then i use _setmode to change the mode of stdin to binary.

My appllication reads characters from stdin using gettchar. In the unicode build, i notice that the content in memory is not utf-16 but probbaly shift-jis encoding...coz characters with code point like 0061say, takes only one byte whereas characters with codepoint 5305 has taken 2 bytes and the value corresponds to the equivalent shift-jis encoding....
How can i ensure that 2 byte format is used for all codepoints....with gettchar
Nov 11 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.