Home  >  Article  >  Operation and Maintenance  >  Solution to garbled code in linux was

Solution to garbled code in linux was

藏色散人
藏色散人Original
2019-11-05 10:18:352771browse

Solution to garbled code in linux was

linux was garbled?

The applications deployed on Linux sometimes have garbled characters. You can try to install Chinese fonts to solve the problem.

Recommended: "Linux Tutorial

Specific method:

1. You can see many fonts in $JAVA_HOME/jre/lib/fonts/ of java , (if it is websphere, it has its own jvm), create a new directory here, named fallback, and put simsun.ttf into the directory

#mkdir fallback
#sudo cp ./your font dir/simsun.ttf fallback/

2. Give the font file permissions as readable

#cd fallback/
#sudo chmod 644 simsun.ttf

3. Then execute in the fallback directory:

#mkfontscale && mkfontdir

At this time, the fonts.dir and fonts.scale files will be generated in the fallback directory, and then the contents of fonts.scale will be appended to the parent directory. fonts.dir,

#su
#cat fonts.scale >> ../fonts.dir

4. If it still doesn’t work, refresh the font cache with fc-cache

#fc-cache

simsun.ttf can be downloaded online

The above is the detailed content of Solution to garbled code in linux was. 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
Previous article:linux $() $differenceNext article:linux $() $difference