void UTF8toGB2312(CString& _str) { CHAR _gb2312[2048]; WCHAR _unicode[1024]; MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)_str, -1, _unicode, 1024); WideCharToMultiByte(CP_OEMCP, 0, _unicode, -1, _gb2312, 2048, NULL, NULL); _str = _gb2312; }