Eclipse encoding Format tutorial, how do I set the encoding format for eclipse?

Source: Internet
Author: User

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 encoding for the Eclipse workspace (workspace) is the default encoding for the operating system, and the default code for the Simplified Chinese operating system (Windows XP, Windows 2000 Simplified Chinese) is GB18030, The engineering code established in this workspace is GB18030, and the Java file created in the project is also GB18030.

The default encoding for new projects for Eclipse is GBK, which modifies the eclipse's configuration so that the default encoding of the new project for Eclipse is directly UTF-8 on the menu bar window->preferences->general-> Workspace->text file encoding change it to UFT-8. This is one of the things that should be done immediately after installing Eclipse. However, this modification is only valid for the current workspace, and the same steps are needed if you create a new or switch to a workspace.

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.

So how do you set it up?

1. Text file encoding, WORKSPAC, Preferences, window, windows

Select other to change the encoding to UTF-8 so that the text file encoding in the Properties dialog box for the newly created project is UTF-8.

2. Content Types, window, Preferences, Windows

Select the text tree, click Open, select Java Source file, enter UTF-8 in the default encoding input box below, press the Update button, then set the Java file encoding to UTF-8.

(Note: Java application Development related files such as: properties, XML, etc. have been specified by the Eclipse default, respectively, Iso8859-1,utf-8, such as the development of the need to change the encoding format can also be specified here.) )

Eclipse encoding Format tutorial, how do I set the encoding format for eclipse?

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.