请问http是否支持收发中文字符?
libaineu2004 opened this issue · comments
firecat commented
HttpMessage.h头文件有如下接口定义:
// body
void SetBody(const std::string& body);
const std::string& Body();
请问,std::string是否支持中文字符?会不会乱码?是不是std::wstring会更好?
ithewei commented
你可以把std::string看作std::vector字符数组,具体的编码自行转换
firecat commented
void SetBody(const std::string& body);
const std::string& Body();
建议新增接口:
void SetBody(const std::wstring& body);
const wstd::string& Body();
服务器和客户端都支持中文字符