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

Set default UTF-8 locale #18

Merged
merged 5 commits into from
Apr 26, 2019
Merged

Set default UTF-8 locale #18

merged 5 commits into from
Apr 26, 2019

Conversation

glin
Copy link
Collaborator

@glin glin commented Apr 25, 2019

The Ubuntu images currently set a default UTF-8 locale (LANG=C.UTF-8), but the CentOS and openSUSE images don't (defaults to LANG=C). This sets a default UTF-8 locale in each base image and adds an R test to confirm that.

Note that the default locales that come with Ubuntu, openSUSE, and CentOS images are all different. Ubuntu and openSUSE come with C.UTF-8, while CentOS only has en_US.UTF-8 as the closest thing.

I also slightly changed how the locale was being set on Ubuntu. It was being set through the Renviron.site file before, which makes it hard to override. For example, if you wanted to change the locale in a Docker image:

FROM rstudio/r-base:3.5-xenial

ENV LANG pt_BR.UTF-8

The locale wouldn't change in R since the Renviron.site file takes precedence. I've set it through an environment variable in the base image instead, which is consistent with what other Docker images do.

References

@glin glin requested a review from jonyoder April 25, 2019 20:49
Copy link
Contributor

@jonyoder jonyoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for doing the research to make this happen.

@glin glin merged commit 055b77a into master Apr 26, 2019
@glin glin deleted the locales branch April 26, 2019 15:52
@glin glin mentioned this pull request Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants