Multi language support in MBCS application
-
Hi Friends, I have a dialog based MBCS application which creates the EDIT control over the dialog using CreateWindowExW API to support languages like Chinese, Japanese etc. When I paste the Chinese characters into the EDIT control, it displays it correctly. I call the GetWindowTextW to extract the content from the control into a wchar_t buffer. But the debugger is not showing the value unless I call CharToOemW. What CharToOem does on that buffer? I would like to know more details with a functional comparison of APIs, WideCharToMultiByte and CharToOem. Thank you
cheers Varghese Paul
-
Hi Friends, I have a dialog based MBCS application which creates the EDIT control over the dialog using CreateWindowExW API to support languages like Chinese, Japanese etc. When I paste the Chinese characters into the EDIT control, it displays it correctly. I call the GetWindowTextW to extract the content from the control into a wchar_t buffer. But the debugger is not showing the value unless I call CharToOemW. What CharToOem does on that buffer? I would like to know more details with a functional comparison of APIs, WideCharToMultiByte and CharToOem. Thank you
cheers Varghese Paul
-
Hi Friends, I have a dialog based MBCS application which creates the EDIT control over the dialog using CreateWindowExW API to support languages like Chinese, Japanese etc. When I paste the Chinese characters into the EDIT control, it displays it correctly. I call the GetWindowTextW to extract the content from the control into a wchar_t buffer. But the debugger is not showing the value unless I call CharToOemW. What CharToOem does on that buffer? I would like to know more details with a functional comparison of APIs, WideCharToMultiByte and CharToOem. Thank you
cheers Varghese Paul
All multi-byte functions work on char buffers and not on wchar_t buffers.
«_Superman_»
-
Hi Friends, I have a dialog based MBCS application which creates the EDIT control over the dialog using CreateWindowExW API to support languages like Chinese, Japanese etc. When I paste the Chinese characters into the EDIT control, it displays it correctly. I call the GetWindowTextW to extract the content from the control into a wchar_t buffer. But the debugger is not showing the value unless I call CharToOemW. What CharToOem does on that buffer? I would like to know more details with a functional comparison of APIs, WideCharToMultiByte and CharToOem. Thank you
cheers Varghese Paul
Varghese Paul M wrote:
But the debugger is not showing the value unless I call CharToOemW. What CharToOem does on that buffer?
I think that the CharToOEM function is converting the string buffer from UTF-8 into the default codepage on your operating system. Code Page Identifiers[^] Code Pages[^] Code page[^] Best Wishes, -David Delaune