Docker's java displays garbled Chinese characters solution:
Execute the following command
sudo apt-get -y install language-pack-zh-hans
or
sudo apt-get -y install language-pack-zh-hans language-pack-zh-hans-base
If you want to support traditional Chinese characters , then execute the following command
sudo apt-get -y install language-pack-zh-hant
or
sudo apt-get -y install language-pack-zh-hant language-pack-zh-hant-base
Environment variables can be used
export LC_ALL=zh_CN.UTF-8
DockerFile can use
ENV LC_ALL zh_CN.UTF-8
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of Java in docker displays Chinese garbled characters. For more information, please follow other related articles on the PHP Chinese website!