[Linux/Ubuntu 10] solve Chinese garbled characters in eclipse under unbuntu, ubuntuunbuntu
Wangdd @ wdd-pc :~ $ Gedit/var/lib/locales/supported. d/local
Add:
Zh_CN.GBK GBK
Zh_CN.GB2312 GB2312
Terminal command: 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... up-to-date
En_ZA.UTF-8... done
En_ZM.UTF-8... done
En_ZW.UTF-8... done
Zh_CN.GB2312... done
Zh_CN.GBK... done
Generation complete.
In this way, Ubuntu supports GBK encoding. Next, set eclipse,
First, select Windows-> Preferences in the eclipse menu bar, then select Workspace under General, and select Other GBK under Text file encoding. If there is no GBK option, it doesn't matter, enter three GBK letters, namely, Apply and GBK-Encoded chinese. It is no longer garbled.