A silly mistake on r217 was fixed.

This commit is contained in:
spx 2009-09-20 08:53:28 +00:00
parent 8414159d62
commit f8bd5fb2eb

View File

@ -129,12 +129,12 @@ std::wstring ConvertToWide(LPCSTR str)
if (str && *str) if (str && *str)
{ {
int strLen = (int)strlen(str) + 1; int strLen = (int)strlen(str) + 1;
int bufLen = MultiByteToWideChar(CP_ACP, 0, str, strLen, NULL, 0); int bufLen = MultiByteToWideChar(CP_UTF8, 0, str, strLen, NULL, 0);
if (bufLen > 0) if (bufLen > 0)
{ {
WCHAR* wideSz = new WCHAR[bufLen]; WCHAR* wideSz = new WCHAR[bufLen];
wideSz[0] = 0; wideSz[0] = 0;
MultiByteToWideChar(CP_ACP, 0, str, strLen, wideSz, bufLen); MultiByteToWideChar(CP_UTF8, 0, str, strLen, wideSz, bufLen);
szWide = wideSz; szWide = wideSz;
delete [] wideSz; delete [] wideSz;
} }