diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-22 01:20:02 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-22 01:20:02 -0700 |
commit | 125bdead3e9be9a6ce23129409612a4d8501980b (patch) | |
tree | 9b87499106f280a32edab404351c5b7e3835e046 /src/qt/rpcconsole.cpp | |
parent | 8435f7b8ee2521d11364f400cf63e9fb3f2c8a7d (diff) | |
parent | 2ecb7555a9df1e843fd25f588819e4ca1d94b266 (diff) |
Merge pull request #2740 from constantined/constantined
UTF-8 support for JSON-RPC
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r-- | src/qt/rpcconsole.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index e7dcdf62a1..e31310c2b6 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -159,7 +159,7 @@ void RPCExecutor::request(const QString &command) else if (result.type() == json_spirit::str_type) strPrint = result.get_str(); else - strPrint = write_string(result, true); + strPrint = write_string(result, json_spirit::pretty_print | json_spirit::raw_utf8); emit reply(RPCConsole::CMD_REPLY, QString::fromStdString(strPrint)); } @@ -173,7 +173,7 @@ void RPCExecutor::request(const QString &command) } catch(std::runtime_error &) // raised when converting to invalid type, i.e. missing code or message { // Show raw JSON object - emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(write_string(json_spirit::Value(objError), false))); + emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(write_string(json_spirit::Value(objError), json_spirit::raw_utf8))); } } catch (std::exception& e) |