Eclipse Encoding Settings

Source: Internet
Author: User

Site code mainly usesGBKCodingFormatEclipseBy default, UTF8 encoding is turned on, so it is often necessary to convert it, or some Chinese characters will be garbled.

1. Configure WORKSPACE Encoding format: windows->preferences->general->workspace, right text file encoding, select Other, change to GBK;
2. Configuration Project Encoding format: Project->preferences->resource->text file encoding;
3. ConfigurationJavaEncoding format of the file: Windows->preferences->general->contenttypes->java Source file->utf-8 ==Update;
4. When you do the product output of RCP application, or the plug-in output, it is always error, either cannot compile through (the output to re-compile), or the output of the plug-in runtime Chinese display garbled. At this time need to re-rcp application, or plug-in plugin project Build.properties add a line, javacdefaultencoding. = UTF-8. Let the output compile when you know the Java source file UTF-8 encoded. This setting needs to ensure that all Java source files are UTF-8 encoded, and if not all, refer to the Eclipse Help (Plug-in development environment Guide > Reference > Feature and Plug-in Build configuration), it is recommended that all Java source files are UTF-8 encoded.

1. Add-vmargs under Eclipse.ini "-dfile.encoding=utf-8".

2.eclipse-->window-->preferences-->general-->workspace-->text File encoding-->UTF-8

3.Installed jres-->default VM arguments:-->-dfile.encoding=utf-8

4.eclipse-->run-->run CONFIGURATIONS-->ARGUMENTS-->VM arguments-->-dfile.encoding=utf-8

5.eclipse-->run-->run Configuration-->common page--Console encoding-->others-->utf-8

==> Password!

5.eclipse-->run-->run Configuration-->common page--Console Encoding-->others-->big5

==>ok!
Reference:
http://eggboss.iteye.com/blog/639841

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.