Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Ubuntu images currently set a default UTF-8 locale (
LANG=C.UTF-8
), but the CentOS and openSUSE images don't (defaults toLANG=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 hasen_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: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
C.UTF-8
vsen_US.UTF-8
: https://community.hpe.com/t5/General/Difference-between-C-utf8-and-en-us-utf8-points/td-p/4418194C.UTF-8
locale by default: https://bugzilla.redhat.com/show_bug.cgi?id=902094