使用v3.1封装的HttpClient发送http请求,用httpResponse接收。
服务器返回头是:
Content-Type: text/plain;
charset=utf-8
获取处理:
std::vector* info = response->getResponseData();
std::string result(info->begin(),info->end());
里面包含中文,为什么显示出来的值是乱码。
使用v3.1封装的HttpClient发送http请求,用httpResponse接收。
服务器返回头是:
Content-Type: text/plain;
charset=utf-8
获取处理:
std::vector* info = response->getResponseData();
std::string result(info->begin(),info->end());
里面包含中文,为什么显示出来的值是乱码。
测试了,要返回gb2312才行,不科学啊。
有人知道返回utf-8该怎么做吗?
解决了,谢谢大家
怎么解决的。
怎么解决的啊