mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Squashed 'src/univalue/' changes from 2740c4f..f32df99
f32df99 Merge branch '2016_04_unicode' into bitcoin 280b191 Merge remote-tracking branch 'jgarzik/master' into bitcoin c9a716c Handle UTF-8 bed8dd9 Version 1.0.2. 5e7985a Merge pull request #14 from laanwj/2015_11_escape_plan git-subtree-dir: src/univalue git-subtree-split: f32df99e96d99ab49e5eeda16cac93747d388245
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include "univalue.h"
|
||||
#include "univalue_escapes.h"
|
||||
|
||||
// TODO: Using UTF8
|
||||
|
||||
using namespace std;
|
||||
|
||||
static string json_escape(const string& inS)
|
||||
@@ -23,15 +21,8 @@ static string json_escape(const string& inS)
|
||||
|
||||
if (escStr)
|
||||
outS += escStr;
|
||||
|
||||
else if (ch < 0x80)
|
||||
else
|
||||
outS += ch;
|
||||
|
||||
else { // TODO handle UTF-8 properly
|
||||
char tmpesc[16];
|
||||
sprintf(tmpesc, "\\u%04x", ch);
|
||||
outS += tmpesc;
|
||||
}
|
||||
}
|
||||
|
||||
return outS;
|
||||
|
||||
Reference in New Issue
Block a user