I have program where I create a thread to do some work. In the thread I do a _tsetlocale(LC_ALL, "tha_tha") for thai, OS is english. I'm still unable to read thai characters in theis thread. Any thoughts?
The following link is an oldie, and some of the details no longer apply...but it does give a good background on what is happening behind the scenes (and why you DO want to use Unicode!)
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!) 2008, 2009,2010 In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Create a dummy dialog based application,
add a simple edit control, add a variable of CString to that edit control
Build the app in MB character set, try typing in the edit field in Thai keyboard. You get Junk characters.
Build the app in unicode, everything is fine.
But Thai (windows 874) is a ASCII character set. I'm I missing something here?
Sure you are. You're missing the difference between CString and edit control. In addition, on some reason you think that thread locale matters somehow to edit box. While the system-wide locale setting only does.
Last edited by Igor Vartanov; October 28th, 2008 at 02:24 PM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.