Issue #, if available:
Customers of corretto-8-docker may observe encoding issues if they use non-ASCII encodings in their java applications. Their applications run well in conventional Linux environments but start failing after they migrate to our docker environments.
Our Corretto docker images are based on amazonlinux. Therefore, we derive a lot from it. The root cause is amazonlinux docker image doesn't set LANG. Unlike general-purposed linux distros, the amazonlinux image prefer to provide a raw/minimal Linux.
The POSIX locale is the key to keep amazonlinux2 image slim. We shouldn't break it. On the other side, Corretto docker images should provide our customers JAVA application runtime. Generally speaking, Java applications run on systems with Unicode charset support. Almost all Java developers assume their targeting Linux environments using utf-8 encoding. We should avoid unexpected behaviors for our customers.
Description of changes:
This is a REDO of PR #24. Thanks you! @smelchior
set LANG to C.UTF-8
After merging this PR, the locale will look as follows:
Issue #, if available: Customers of corretto-8-docker may observe encoding issues if they use non-ASCII encodings in their java applications. Their applications run well in conventional Linux environments but start failing after they migrate to our docker environments.
Our Corretto docker images are based on amazonlinux. Therefore, we derive a lot from it. The root cause is amazonlinux docker image doesn't set LANG. Unlike general-purposed linux distros, the amazonlinux image prefer to provide a raw/minimal Linux.
Here is the raw locale of amazonlinux2 image:
The POSIX locale is the key to keep amazonlinux2 image slim. We shouldn't break it. On the other side, Corretto docker images should provide our customers JAVA application runtime. Generally speaking, Java applications run on systems with Unicode charset support. Almost all Java developers assume their targeting Linux environments using utf-8 encoding. We should avoid unexpected behaviors for our customers.
Description of changes: This is a REDO of PR #24. Thanks you! @smelchior
set LANG to C.UTF-8
After merging this PR, the locale will look as follows:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.