Skip to content

Commit

Permalink
issue#1971 Default file.encoding system property to UTF-8 during nati…
Browse files Browse the repository at this point in the history
…ve image build, to prevent inconsistent platform specific issues in generated native image
  • Loading branch information
jaikiran committed Jul 7, 2020
1 parent e711e0d commit 6f27367
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 6f27367

Please sign in to comment.