mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -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]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user