Open npierot06 opened 3 years ago
Hi again, maybe zip file is not appropiated here :)
here are the files : A.java :
public class A { public static void main(String... args) { System.out.println("file.encoding=" + System.getProperty("file.encoding")); System.out.println("sun.jnu.encoding=" + System.getProperty("sun.jnu.encoding")); System.out.println("java.version=" + System.getProperty("java.version")); System.out.println("LANG=" + System.getenv("LANG")); System.out.println("\u65E5"); } }
Dockerfile :
FROM gcr.io/distroless/java:11
COPY --from=debian:9.11 /usr/lib/locale /usr/lib/locale ENV LANG=C.UTF-8 COPY A.java /A.java ENTRYPOINT ["java", "-Dfile.encoding=UTF-8", "/A.java"]
Thanks
Hello all, It seems that in the latest distroless/java:11, the sun.jnu.encoding is back to ANSI_X3.4-1968 instead of UTF-8 when using LANG=C.UTF-8
I tried 3 different images :
Fo now I can deal with the working sha256, but it would be great if the same fix done for https://github.com/GoogleContainerTools/distroless/issues/253 would be applied in future releases
Here is a test case to reproduce test.zip
docker build -t test . && docker run --rm test
Thanks for all