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?
Thanks in advance
Printable View
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?
Thanks in advance
Do you have actuall Thai font installed? If you have and it still wont work,
maybe AppLocale can help you
Thanks, yes I have the eastern languages (including ) Thai installed.
I cant use applocale as this is a server based system and its in a dll.
So probably this is a system based problem and this is not the best forum for that kind of problems.
Please explain that "unable to read" thing.Quote:
Originally Posted by IndikaNiva
ok lets simplify this
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?
Thanks.
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!)
http://msdn.microsoft.com/en-us/magazine/cc301794.aspx
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. :)Quote:
Originally Posted by IndikaNiva
Thank you Igor,
Long time no see!