Eclipse does not support gbk encoding in ubuntu

Today, under ubuntu, the project under Windows is imported into Eclipse under Linux. Since the project code is GBK encoding, and Ubuntu does not support GBK encoding by default, Ubuntu must support GBK.

Methods as below:

1、 Modify the /var/lib/locales/supported.d/local file and add in the file

zh_CN.GBK GBK

zh_CN.GB2312 GB2312

2、 sudo dpkg-reconfigure --force locales

Then in the output result will appear

zh_CN.GB2312 done

zh_CN.GBK done

In this way, ubuntu supports GBK encoding.

Set up eclipse:

First of all, windows->preference, then select workspace->Text encoding under General and select Other GBK. If there is no GBK option, it doesn't matter, directly enter the three letters of GBK, Apply, GBK encoded Chinese, it is no longer garbled.

Recommended Posts

Eclipse does not support gbk encoding in ubuntu
Set UTF-8 encoding for MySQL5.7 in Ubuntu 16.04