以下是一个jsoncpp解析有\u中文json文件的例子:
std::string showname = rootOne["showname"].asString();
int len=strlen(showname.c_str())+1;
char outch[MAX_PATH];
WCHAR * wChar=new WCHAR[len];
wChar[0]=0;
MultiByteToWideChar(CP_UTF8, 0, showname.c_str(), len, wChar, len);
 
WideCharToMultiByte(CP_ACP, 0, wChar, len, outch , len, 0, 0);
delete [] wChar;
char* pchar = (char*)outch;
这样就得到一个char * 可用于其他的转换
如果要把pchar显示到控件上(比如ListView):
int len=strlen(pchar)+1;
WCHAR outName[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, pchar, len, outName, len);

ListView_SetItemText(hWndListView, index, 2, outName);

源文地址:http://www.software8.co/wzjs/cpp/2807.html