Skip to content

Commit

Permalink
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/org/jcodings/unicode/UnicodeEncoding.java
Original file line number Diff line number Diff line change
@@ -579,9 +579,9 @@ private static CaseInsensitiveBytesHash<Integer> initializeCTypeNameTable() {
private static class CodeList {
CodeList(DataInputStream dis) throws IOException {
int packed = dis.readInt();
this.flags = packed & ~Config.CodePointMask;
flags = packed & ~Config.CodePointMask;
int length = packed & Config.CodePointMask;
this.codes = new int[length];
codes = new int[length];
for (int j = 0; j < length; j++) {
codes[j] = dis.readInt();
}
@@ -744,12 +744,13 @@ static ArrayList<int[]> read() {
}
values.add(codes);
}
dis.close();
return values;
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}

private static ArrayList<int[]> Values = read();
static final ArrayList<int[]> Values = read();
}
}
2 changes: 1 addition & 1 deletion test/org/jcodings/specific/TestUnicode.java
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ String caseMap(String fromS, int flags) throws Exception {
IntHolder flagP = new IntHolder();
flagP.value = flags;
int len = enc.caseMap(flagP, from, fromP, from.length, to, 0, to.length);
return new String(to, 0, len);
return new String(to, 0, len, "utf-8");
}

@Test

0 comments on commit 3bcdcd3

Please sign in to comment.