File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
package org .json ;
2
2
3
3
import java .io .*;
4
+ import java .nio .charset .Charset ;
4
5
5
6
/*
6
7
Public Domain.
@@ -56,7 +57,7 @@ public JSONTokener(Reader reader) {
56
57
* @param inputStream The source.
57
58
*/
58
59
public JSONTokener (InputStream inputStream ) {
59
- this (new InputStreamReader (inputStream ));
60
+ this (new InputStreamReader (inputStream , Charset . forName ( "UTF-8" ) ));
60
61
}
61
62
62
63
@@ -120,7 +121,7 @@ public static int dehexchar(char c) {
120
121
121
122
/**
122
123
* Checks if the end of the input has been reached.
123
- *
124
+ *
124
125
* @return true if at the end of the file and we didn't step back
125
126
*/
126
127
public boolean end () {
@@ -184,7 +185,7 @@ public char next() throws JSONException {
184
185
this .previous = (char ) c ;
185
186
return this .previous ;
186
187
}
187
-
188
+
188
189
/**
189
190
* Get the last character read from the input or '\0' if nothing has been read yet.
190
191
* @return the last character read from the input.
You can’t perform that action at this time.
0 commit comments