Open marron9999 opened 3 years ago
In redpen/redpen-core/src/main/java/cc/redpen/formatter/Formatter.java
ByteArrayOutputStream baos = new ByteArrayOutputStream(); : format(new PrintWriter(baos), docErrorsMap); : return new String(baos.toByteArray(), StandardCharsets.UTF_8);
I think it depends on the default character encoding of PrintWriter. And, should use OutputStreamWriter.
ByteArrayOutputStream baos = new ByteArrayOutputStream(); OutputStreamWriter osw = new OutputStreamWriter(baos, StandardCharsets. UTF _ 8) : format(new PrintWriter(osw), docErrorsMap); : return new String(baos.toByteArray(), StandardCharsets.UTF_8);
In redpen/redpen-core/src/main/java/cc/redpen/formatter/Formatter.java
ByteArrayOutputStream baos = new ByteArrayOutputStream(); : format(new PrintWriter(baos), docErrorsMap);
: return new String(baos.toByteArray(), StandardCharsets.UTF_8);
I think it depends on the default character encoding of PrintWriter. And, should use OutputStreamWriter.
ByteArrayOutputStream baos = new ByteArrayOutputStream(); OutputStreamWriter osw = new OutputStreamWriter(baos, StandardCharsets. UTF _ 8) : format(new PrintWriter(osw), docErrorsMap);
: return new String(baos.toByteArray(), StandardCharsets.UTF_8);