Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default system character encoding of the base image should be UTF-8 #151

Open
vlahoda opened this issue Jun 27, 2023 · 4 comments
Open
Assignees
Labels

Comments

@vlahoda
Copy link

vlahoda commented Jun 27, 2023

The default system character encoding of the base image should be UTF-8, IMO.

The locale command in bitnami containers output:
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

while most common expected settings are:

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

I believe that the latter is the expected behaviour.

@dgomezleon
Copy link
Member

Hi @vlahoda ,

Thanks for your feedback. I have created an internal task to review it.

@24mu13
Copy link

24mu13 commented Aug 8, 2024

A possible workaround for my Dockerfile since it's on-hold for a while now:

FROM bitnami/minideb:bookworm 

RUN install_packages bash locales git ca-certificates jq curl gnupg wget unzip
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
    dpkg-reconfigure --frontend=noninteractive locales && \
    update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8

# ...

@james-w
Copy link
Contributor

james-w commented Aug 8, 2024

The base debian image says this:

Given that it is a faithful "minbase" install of Debian, this image only includes the C, C.UTF-8, and POSIX locales by default. For most uses requiring a UTF-8 locale, C.UTF-8 is likely sufficient (-e LANG=C.UTF-8 or ENV LANG C.UTF-8).

Have you tried with setting LANG=C.UTF-8 environment variable with minideb?

@vlahoda
Copy link
Author

vlahoda commented Aug 8, 2024

The base debian image says this:

Given that it is a faithful "minbase" install of Debian, this image only includes the C, C.UTF-8, and POSIX locales by default. For most uses requiring a UTF-8 locale, C.UTF-8 is likely sufficient (-e LANG=C.UTF-8 or ENV LANG C.UTF-8).

Have you tried with setting LANG=C.UTF-8 environment variable with minideb?

If I remember correctly, I've used LANG=en_US.UTF-8. I suppose C.UTF-8 would work as well - my point was that the LANG variable should be set by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants