G
Guest
Here is the problem we've encountered. An application that used to
successfully display Japanese Kanji characters no longer does so when
recompiled with 7.1
When compiled with the 6.0 compiler, both of the following methods are
successful in displaying Japanese characters in a multi-line CEdit control on
a machine that is fully configured as a Japanese machine (Japanese version of
Windows 2000 SP4). The same code, compiled with 7.1, only displays blanks or
incorrect characters. The program is compiled for MBCS, not Unicode, so we
are in effect calling SetWindowTextA in Method 1.
METHOD 1:
=========
// Make a little buffer for the MBCS character
TCHAR cPtr[6];
for (int i = 0; i < 6; i++) cPtr = 0;
int iRet = WideCharToMultiByte (932, 0, L"\x3042", 1, cPtr, 6, NULL, NULL);
// Display Hiragana A character
m_cProblemEdit.SetWindowText(cPtr);
METHOD 2:
=========
CString sProblem;
//...Iinitialize sProblem with Kanji string ....
// Display string
m_CProblemEditSetWindow(sProblem);
successfully display Japanese Kanji characters no longer does so when
recompiled with 7.1
When compiled with the 6.0 compiler, both of the following methods are
successful in displaying Japanese characters in a multi-line CEdit control on
a machine that is fully configured as a Japanese machine (Japanese version of
Windows 2000 SP4). The same code, compiled with 7.1, only displays blanks or
incorrect characters. The program is compiled for MBCS, not Unicode, so we
are in effect calling SetWindowTextA in Method 1.
METHOD 1:
=========
// Make a little buffer for the MBCS character
TCHAR cPtr[6];
for (int i = 0; i < 6; i++) cPtr = 0;
int iRet = WideCharToMultiByte (932, 0, L"\x3042", 1, cPtr, 6, NULL, NULL);
// Display Hiragana A character
m_cProblemEdit.SetWindowText(cPtr);
METHOD 2:
=========
CString sProblem;
//...Iinitialize sProblem with Kanji string ....
// Display string
m_CProblemEditSetWindow(sProblem);