Coder Social home page Coder Social logo

Comments (9)

icecreamhead avatar icecreamhead commented on September 28, 2024 1

I'm not sure if we have the exact same issue, but my workaround was to override the java tool options with utf-8 file encoding in my dockerfile.

ENV JAVA_TOOL_OPTIONS="-XX:+UseContainerSupport -Dfile.encoding=UTF-8"

from openjdk-docker.

jrudolph avatar jrudolph commented on September 28, 2024 1

I'm not sure if we have the exact same issue, but my workaround was to override the java tool options with utf-8 file encoding in my dockerfile.

ENV JAVA_TOOL_OPTIONS="-XX:+UseContainerSupport -Dfile.encoding=UTF-8"

No, this one is different. file.encoding is for file contents while sun.jnu.encoding is for file names.

from openjdk-docker.

jrudolph avatar jrudolph commented on September 28, 2024 1

I think, I understand now what's going on.

The adoptopenjdk docker image doesn't really build against musl. Instead, it just uses the precompiled binaries built against standard glibc and then installs some version of glibc into alpine.

musl itself always supports UTF-8 out of the box. So, if adoptopenjdk would be built against musl it would probably support UTF-8 out of the box.

However, if you run with glibc you will need proper glibc locales to support anything other than C which comes with a default encoding of ANSI_X3.4-1968, i.e. basically ASCII.

Proper musl support for adoptopenjdk would probably be interesting as it can make for even smaller images (e.g. there's a Zulu for Alpine release) but let's treat this as out-of-scope for this ticket.

Without going the full way to musl support, what needs to be done is actually quite simple: you need to generate at least one UTF-8 locale and use that as a default. As the current docker files already download glibc packages, the only thing missing would be to also install glibc-i18n and then run localedef -i en_US -f UTF-8 en_US.UTF-8 and set en_US.UTF-8 as the default locale in /etc/profile or as an environment variable (like it was done in #111 for ubuntu).

from openjdk-docker.

stbischof avatar stbischof commented on September 28, 2024

Some news on this issue?

from openjdk-docker.

grzesuav avatar grzesuav commented on September 28, 2024

#111 - does it helps ?

from openjdk-docker.

grzesuav avatar grzesuav commented on September 28, 2024

I have added (I hope so) UTF-8 to alpine image

from openjdk-docker.

grzesuav avatar grzesuav commented on September 28, 2024

Thank @jrudolph for explaining, I will try to provide an alpine fix then

from openjdk-docker.

grzesuav avatar grzesuav commented on September 28, 2024

https://github.com/frol/docker-alpine-glibc/blob/master/Dockerfile will use this as reference

from openjdk-docker.

grzesuav avatar grzesuav commented on September 28, 2024

#155

from openjdk-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.