Home  >  Article  >  Operation and Maintenance  >  Java in docker displays Chinese garbled characters

Java in docker displays Chinese garbled characters

尚
Original
2020-04-03 14:35:022889browse

Java in docker displays Chinese garbled characters

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn