Ubuntu is not supported by default GBK coding. So, first we must first make Ubuntu support GBK, as follows:
-
Modify /var/lib/locales/supported.d/local file, add in the filezh_CN.GBK GBKzh_CN.GB2312 GB2312
-
sudo dpkg-reconfigure --force localesThen will appear in the printed outputzh_CN.GB2312 donezh_CN.GBK done
In this way, Ubuntu supports the GBK encoding, the following settings eclipse.
First Windows-> Preferences, then select General following Workspace. Text file encoding selection Other GBK, GBK if there is no option, it does not matter, direct input GBK three letters, Apply, GBK coded Chinese, is not garbled.
Original: https://blog.51cto.com/leaze/195584