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: 6231c2b002
Author: yjogol <yjogol2@online.de>
Date: 2011-09-09 (Fri, 09 Sep 2011)



------------------
This commit was generated by Migit
This commit is contained in:
yjogol
2011-09-09 18:12:17 +00:00
parent 037574e7ed
commit a7ceb31487

View File

@@ -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]);
}