new_armbie Posted March 17, 2020 Posted March 17, 2020 I am using armbian with Orange Pi Pc. I am using Chromium, Netsurf browser. Both these browsers can display chinese characters without problem. However, w3m is unable to display chinese fonts. Is there any solution for this issue? (I think this is not a w3m issue, as i can display chinese fonts via w3m in puppy linux, ubuntu etc in other machines)
ning Posted March 18, 2020 Posted March 18, 2020 1, you need to comfirm you locale is correct. Quote locale LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:zh LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL= 2, if LC_ALL=C, please search it in /etc/ , remove this define 3, edit /etc/locale.gen , enable zh_CN.UTF-8, and disable en_US.XXX, and run sudo locale-gen 4, run sudo update-locate, if error manully edit /etc/default/locale, follow above locale output. 5, install chinese fonts, fonts-wqy-microhei fonts-wqy-zenhei, or others you like to use. for w3m, if your terminal supports chinese, then it supports. if you run it from tty, please also install zhcon.
new_armbie Posted March 20, 2020 Author Posted March 20, 2020 On 3/18/2020 at 10:34 AM, ning said: 1, you need to comfirm you locale is correct. 2, if LC_ALL=C, please search it in /etc/ , remove this define 3, edit /etc/locale.gen , enable zh_CN.UTF-8, and disable en_US.XXX, and run sudo locale-gen 4, run sudo update-locate, if error manully edit /etc/default/locale, follow above locale output. 5, install chinese fonts, fonts-wqy-microhei fonts-wqy-zenhei, or others you like to use. for w3m, if your terminal supports chinese, then it supports. if you run it from tty, please also install zhcon. After few days, still unable to get w3m to display chinese font on xfce4 terminal. Below is my locale output: LANG=en_US.UTF-8 LANGUAGE=en LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=C I installed chinese fonts already. As shown above is LC_ALL=C. Sometimes i manage to change them to zh_CN, but still unable to display chinese in terminal under armbian. Which part i did wrong?
new_armbie Posted March 21, 2020 Author Posted March 21, 2020 Edit 21.03.2020: Finally i got the chinese font to display in terminal. Thanks for the above instructions, however, if others reading this thread facing similar issue, you can try key in the following command as well: export LC_ALL="zh_CN.UTF-8" this is the missing step that worked for me after i done all the above instructions.
Recommended Posts