This problem arises, I first went to look for a few questions:
1. Whether the file is Utf-8
2. Upload to Hadoop in Linux and see if it's garbled on Linux
3. There is no problem, go to check Eclipse, Project engineering to change to Utf-8, found no
4. After a look at the introduction, the eclipse's system settings were changed to Uft-8, you can
UTF-8 settings in Eclipse
1.windows->preferences Open the Preferences dialog box;
2. Then, General->workspace, the right text file encoding, select Other, change to UTF-8.
3.web-> Open, CSS, HTML, JSP, JavaScript, XML and other settings to UTF-8.
or change here, general->content Types, right context Types tree, click Text, select Java Source File, enter UTF-8 in the default encoding input box below, point to update , set the Java file encoding to UTF-8. The other method is the same if you need to change.
4.java->installed JREs.
Remove the Jdk6.0 from the original eclipse, and reconfigure the JDK 1.6.0_06 (ADD: Under the Java file in the C drive, Programe. C:\Program Files\java)
Other than that
UTF-8 settings in MyEclipse
Same
---preferences option under 1Window option;
2 Open Preferences->general->workspace, set UTF-8;
3 is also preferences->myeclipse->files and Editors->css, HTML, JSP, JavaScript, XML Settings UTF-8.
4 the same is preferences->java->installed JREs: Remove the original MyEclipse Jdk6.0, from the new configuration jdk1.6.0_06 (ADD: In the C drive, programe java file).
Reason for modification:
If you want to enable plug-in development applications to have better internationalization support, to maximize the support of Chinese output, it is best to make Java files using UTF-8 encoding. However, the default character encoding for the Eclipse workspace (workspace) is the default encoding for the operating system, and the Simplified Chinese operating system (Windows XP, Windows
The default encoding for 2000 Simplified Chinese is GB18030, the project code established in this workspace is GB18030, and the Java file created in the project is also GB18030. If you want to make the new project, Java files directly to the UTF-8, you need to do the above work, should not be ignored.
Eclipse view files garbled in Hadoop