Original link: http://leaze.blog.51cto.com/83088/195584
Today, the project under Windows was imported into Linux under Eclipse, because the previous engineering code was GBK encoded, and Ubuntu does not support GBK encoding by default. So, first we have to let Ubuntu support GBK, the method is as follows:
- Modify the/var/lib/locales/supported.d/local file to add ZH_CN to the file. GBK GBKZH_CN. GB2312 GB2312
- sudo dpkg-reconfigure--force locales then appears zh_cn in the output results. GB2312 DONEZH_CN. GBK Done
In this way, Ubuntu supports GBK encoding, set eclipse below.
First Windows->preferences, then select the workspace below General. Text file Encoding Select other GBK, if there is no GBK option, it's okay, directly input GBK three letters, Apply, GBK encoded in Chinese, is not garbled.
This article is from the "Son" blog, please make sure to keep this source http://leaze.blog.51cto.com/83088/195584
Let Eclipse support GBK encoding under Linux