Skip to content

Commit

Permalink
Merge pull request #10527 from jaikiran/utf8-default-nativeimage
Browse files Browse the repository at this point in the history
Default file.encoding system property to UTF-8 during native image build
  • Loading branch information
gsmet authored Jul 7, 2020
2 parents f8560b9 + 6f27367 commit 18a4fe7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa
}
}
command.add("-J-Duser.language=" + System.getProperty("user.language"));
command.add("-J-Dfile.encoding=" + System.getProperty("file.encoding"));
// Native image runtime uses the host's (i.e. build time) value of file.encoding
// system property. We intentionally default this to UTF-8 to avoid platform specific
// defaults to be picked up which can then result in inconsistent behaviour in the
// generated native application
command.add("-J-Dfile.encoding=UTF-8");

if (enableSslNative) {
nativeConfig.enableHttpsUrlHandler = true;
Expand Down

0 comments on commit 18a4fe7

Please sign in to comment.