From a7ceb31487e02e47c0f8465cad2c686698e45886 Mon Sep 17 00:00:00 2001 From: yjogol Date: Fri, 9 Sep 2011 18:12:17 +0000 Subject: [PATCH] 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 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6231c2b00275a1c7df5a3df9874c8bde82dd1183 Author: yjogol Date: 2011-09-09 (Fri, 09 Sep 2011) ------------------ This commit was generated by Migit --- src/nhttpd/yhttpd_core/helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nhttpd/yhttpd_core/helper.cpp b/src/nhttpd/yhttpd_core/helper.cpp index 454756e27..68d7b55e3 100644 --- a/src/nhttpd/yhttpd_core/helper.cpp +++ b/src/nhttpd/yhttpd_core/helper.cpp @@ -299,7 +299,7 @@ std::string json_out_error(std::string _error) { std::string json_convert_string(std::string s) { std::stringstream ss; 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 << unsigned(s[i]); }