nhttpd: activate UTF-8 encoding for outValue

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1683 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
yjogol
2011-09-09 18:12:17 +00:00
parent b151eaebf7
commit 6231c2b002

View File

@@ -299,7 +299,7 @@ std::string json_out_error(std::string _error) {
std::string json_convert_string(std::string s) { std::string json_convert_string(std::string s) {
std::stringstream ss; std::stringstream ss;
for (size_t i = 0; i < s.length(); ++i) { for (size_t i = 0; i < s.length(); ++i) {
if (unsigned(s[i]) < '\x20' || s[i] == '\\' || s[i] == '"') { if (unsigned(s[i]) < '\x20' || s[i] == '\\' || s[i] == '"' || unsigned(s[i]) >= '\x80') {
ss << "\\u" << std::setfill('0') << std::setw(4) << std::hex ss << "\\u" << std::setfill('0') << std::setw(4) << std::hex
<< unsigned(s[i]); << unsigned(s[i]);
} }