summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorThomas E. Enebo <tom.enebo@gmail.com>2012-02-08 15:20:07 -0600
committerFlorian Frank <flori@ping.de>2012-02-11 09:44:17 +0100
commitc93d679936aa5658c700b5c84367211e84b16238 (patch)
tree73b37f697ff06476ee79e39b26430f86d682abfb /java
parent29e88befe5335134d03e91f9943fc7fe9732da71 (diff)
downloadjson-c93d679936aa5658c700b5c84367211e84b16238.tar.gz
Propagate src encoding to values made from it (fixes 1.9 mode converting everything to ascii-8bit; harmless for 1.8 mode too)
Diffstat (limited to 'java')
-rw-r--r--java/src/json/ext/StringDecoder.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/src/json/ext/StringDecoder.java b/java/src/json/ext/StringDecoder.java
index a4ee975..6023113 100644
--- a/java/src/json/ext/StringDecoder.java
+++ b/java/src/json/ext/StringDecoder.java
@@ -31,6 +31,7 @@ final class StringDecoder extends ByteListTranscoder {
ByteList decode(ByteList src, int start, int end) {
ByteList out = new ByteList(end - start);
+ out.setEncoding(src.getEncoding());
init(src, start, end, out);
while (hasNext()) {
handleChar(readUtf8Char());