activity影象亂碼

我就是曹總發表於2019-12-17

1、新增中文支援

下載宋體檔案,把下載好的 simsun.ttc 檔案放到 /usr/share/fonts/simsun.ttc 目錄

網盤連結:https://pan.baidu.com/s/1_CXNfm0l5Lq_AtBaMxWpBg           提取碼:p9oi 

執行命令

mkfontdir
mkfontscale
fc-cache -fv



以下顯示操作成功

fc-list :lang=zh
/usr/share/fonts/simsun.ttc: SimSun,宋體:style=Regular
/usr/share/fonts/bitmap/fangsongti24.pcf.gz: Fangsong ti:style=Regular
/usr/share/fonts/simsun.ttc: NSimSun,新宋體:style=Regular
/usr/share/fonts/bitmap/fangsongti16.pcf.gz: Fangsong ti:style=Regular



2、配置環境變數 ~/.bash_profile

export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"



3、修改centos7為中文支援

[root@ppcg1904 opt]# vim /etc/locale.conf 

LANG=zh_CN.UTF-8




內容均為作者獨立觀點,不代表八零IT人立場,如涉及侵權,請及時告知。

相關文章