BrotliHaxe icon indicating copy to clipboard operation
BrotliHaxe copied to clipboard

Fix Java encoder to use ISO-8859-1

Open hackvertor opened this issue 5 years ago • 0 comments

The Java encoder was corrupting the decoded string with unicode replacement characters. We fixed this by changing the charset in Bytes.java to ISO-8859-1.

https://github.com/dominikhlbg/BrotliHaxe/blob/master/java/src/haxe/io/Bytes.java#L54 Line 54 (BrotliHaxe/java/src/haxe/io/Bytes.js):

return new java.lang.String(this.b, pos, len, "ISO-8859-1");

hackvertor avatar Mar 06 '19 13:03 hackvertor