1、windows平台下
#ifdef _WIN32
int CParserIni::ansi2utf8(const string& ansiStr, string& utf8Str)
{
int...转换utf8
int len = WideCharToMultiByte(CP_UTF8, 0, pwBuf, -1, NULL, NULL, NULL, NULL);
if (len == 0)...(const string& utf8Str, string& ansiStr)
{
int ret = kNoError;
do{
//将utf8转成utf16(wchar_t)
if...(utf8Str.empty()) BREAK_WITH_ERROR(kInvalidParameter);
int wlen = MultiByteToWideChar(CP_UTF8, 0, utf8Str.c_str..., 0, utf8Str.c_str(), utf8Str.length(), pwBuf, wlen) == 0)
BREAK_WITH_ERROR(kConvertError);
//将wchar_t