Can anybody provide a solution for below problem.
Code sample: vc++ under VS 2010
/////////////////////////////////////////////////
patternValue= タイプ
patternLen = 3
int nChars = WideCharToMultiByte( CP_UTF8, 0, patternValue, patternLen,
NULL, 0 , NULL, NULL); //changed from CP_UTF8 to the retrieved code page
char *pChars = new char[nChars];
ZeroMemory(pChars, nChars );
WideCharToMultiByte( codPageTobeUsed, 0, patternValue, patternLen,
pChars, nChars , NULL, NULL);
pChars[nChars] = '\0';
_bstr_t bstrPattern(pChars);
///////////////////////////////////////////////
After conversion :
The bstrpattern contains as タイチE
the problematic character is プ after conversion it has ' チE'
The above is happened for all the japanese Katakana character set(i.e. 0x30D0 to 0x30DF)
This problem is happened when the system has japanese locale only.()
how to change system locale is :Control Panel\All Control Panel Items ->region and language then select Administrative tab then click changesystemlocale
Can anybody resolve the problem and send me the solution to ramu.50k@gmail.com
Best Regards,
Ramakrishna N