Eclipse fully set UTF-8 environment

Source: Internet
Author: User

When starting a new Java project, it is best to set the entire environment to UTF-8

It is usually set in the following steps:

1: Set the encoding format for the workspace: Text file Encoding, Workspace, General, Windows, Preferences, Window

2: Settings file format is Utf-8:window, Preferences, General and Content Types

2.1: Set the default encoding:utf-8 of text

2.2 Expand the text node, and the default encoding for the Java Source and JSP nodes is also set to: Utf-8

3: Set JSP Files----Encoding Preferences, Web---Utf-8:window

3.1 Set to: Iso_10646/unicode (UTF-8)

4: After the above 3 steps, the new Java file is UTF-8 encoding, Eclipse compile, run, Debug no problem, but do the RCP application product output, or plug-in output, always error, or can not 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.

Eclipse fully set UTF-8 environment

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.