We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1271c85 commit 7bac7a5Copy full SHA for 7bac7a5
src/main/java/org/apache/maven/plugin/compiler/ForkedTool.java
@@ -164,7 +164,13 @@ final boolean run(
164
builder.redirectOutput(dest);
165
return start(builder, out) == 0;
166
} finally {
167
- out.append(Files.readString(output.toPath()));
+ /*
168
+ * Need to use the native encoding because it is the encoding used by the native process.
169
+ * This is not necessarily the default encoding of the JVM, which is "file.encoding".
170
+ * This property is available since Java 17.
171
+ */
172
+ String cs = System.getProperty("native.encoding");
173
+ out.append(Files.readString(output.toPath(), Charset.forName(cs)));
174
output.delete();
175
}
176
0 commit comments