If u have some files saved as GB18030 being opened under eclipse, there may be some ugly codes.

To remove these ugly codes, u need locale-gen. Do this:
locale-gen zh_CN.GB18030

locale-gen zh_CN.GBK

Then in your eclipse->window->Prefrences->General->Workspace, set the “Text file encoding” to GB18030 or GBK.
BTW, if u have some java file saved as GBK in Windows, and u import them to eclipse in Ubuntu, and experience some java compile errors, then u may fix it by this way.
Another way is to turn your GB18030/GBK codes into UTF-8 codes.
enconv –L zh_CN –x UTF-8 <your file>