-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-8 support for JSON-RPC #2740
Conversation
I'm all for supporting UTF-8, but raw utf8 is non-standard JSON and will likely break compatibility with some parsers. Escaping using \uNNNN is the norm. I'm not convinced we should enable it:
|
@laanwj How is it non-standard? The specification seems to say raw UTF-8 is standard and parsers must handle it... |
JSON Spirit without raw_utf8 escapes every byte as UTF-8 character. For example, U+0432 will be escaped as \u00D0\u00B2. raw_utf8 is solution. |
Well the help text said it is non-standard, and I was going on that, but according to http://www.ietf.org/rfc/rfc4627.txt?number=4627
So, as long as it still escapes those characters it is OK. |
Sorry, it was my own issue. Solved by upgrading boost libs from v1.52 to v1.53. |
Changelog for 4.04 to 4.06 Version 4.04, 8 January 2011 Version 4.05, 12 September 2011 Version 4.06, 14 May 2013 http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented#hist |
Any reason not to update? |
I'd like to see json_spirit update separate from any UTF8 fixes. i.e. two commits: update json spirit, then switch raw_utf8 |
@jgarzik Seems like a good thing to do. Also I hope the new json_spirit version fixes a compiler warning I get: \src\json\json_spirit_writer_template.h:31: Warnung:typedef 'Char_type' locally defined but not used [-Wunused-local-typedefs] typedef typename String_type::value_type Char_type; ^ |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2ecb7555a9df1e843fd25f588819e4ca1d94b266 for binaries and test log. |
@constantined I also did not have that error with MinGW < 4.8.1, but perhaps latest json_spirit fixes this anyway :). |
Looks pretty good. Made one inline comment. Do Qt guys agree that RPC console should pretty print? |
Did a quick web search, but perhaps you can tell me what pretty-print means for RPC console or perhaps give a formated example? |
I tried this out and didn't see any change to the JSON as printed in the console before/after this patch. So it's ACK by me. |
If this happens, please be sure that #2980 is fixed. |
Is there anything blocking this? |
Works for me. |
UTF-8 support for JSON-RPC
Had to revert this -- it broke JSON-RPC values. See #3126 |
No description provided.