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

Solution to garbled code in linux was

藏色散人
Release: 2019-11-05 10:18:35
Original
2847 people have browsed it

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/
Copy after login

2. Give the font file permissions as readable

#cd fallback/
#sudo chmod 644 simsun.ttf
Copy after login

3. Then execute in the fallback directory:

#mkfontscale && mkfontdir
Copy after login

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
Copy after login

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

#fc-cache
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template