Closed GoogleCodeExporter closed 9 years ago
I'll handle this one.
Original comment by Spd...@gmail.com
on 29 Jun 2012 at 5:43
[deleted comment]
Issue Fixed with version 0.3.3.
Please control and report.
SpdyMx
Original comment by Spd...@gmail.com
on 29 Jun 2012 at 10:28
The default encoding should be UTF-8 since the RFC-4627
(http://www.ietf.org/rfc/rfc4627.txt) says:
3. Encoding
JSON text SHALL be encoded in Unicode. The default encoding is
UTF-8.
Since the first two characters of a JSON text will always be ASCII
characters [RFC0020], it is possible to determine whether an octet
stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
at the pattern of nulls in the first four octets.
00 00 00 xx UTF-32BE
00 xx 00 xx UTF-16BE
xx 00 00 00 UTF-32LE
xx 00 xx 00 UTF-16LE
xx xx xx xx UTF-8
So what about change the 15th line in org.alexd.jsonrpc.JSONRPCClient.java from:
protected String encoding = "";
to:
protected String encoding = HTTP.UTF_8;
Thanks.
lvqier
Original comment by lvqier
on 29 Jun 2012 at 5:14
Original issue reported on code.google.com by
lvqier
on 26 Jun 2012 at 2:12