Linux below eclipse appears garbled in Chinese
Before the code under Windows moved to the Ubuntu system, it was garbled because the GBK character set under Windows was not supported by default and needed to be added to the configuration file by itself.
1. Add the following/var/lib/locales/supported.d/local file:
Zh_cn. GBK GBK
Zh_cn. GB2312 GB2312
2. Reconfigure the locals package:
[Email protected]:~$ sudo dpkg-reconfigure--force locales
Generating locales ...
En_ag. UTF-8 ... done
En_au. UTF-8 ... done
EN_BW. UTF-8 ... done
En_ca. UTF-8 ... done
En_dk. UTF-8 ... done
en_GB. UTF-8 ... done
En_hk. UTF-8 ... done
En_ie. UTF-8 ... done
En_in. UTF-8 ... done
En_ng. UTF-8 ... done
En_nz. UTF-8 ... done
En_ph. UTF-8 ... done
En_sg. UTF-8 ... done
en_US. UTF-8 ... done
En_za. UTF-8 ... done
En_zm. UTF-8 ... done
En_zw. UTF-8 ... done
Zh_cn. GB2312 ... done
Zh_cn. GBK ... done
Zh_cn. UTF-8 ... up-to-date
Zh_sg. UTF-8 ... up-to-date
Generation complete.
3. Configure eclipse:windows-> Preferences-> workspace-> Text file encoding Set other = GBK.
Linux below eclipse appears garbled in Chinese