Encoding format settings for Eclipse

Source: Internet
Author: User

In the Eclipse development, many file encodings are iso-8859-1 by default and do not support Chinese (such as commonly used JSPs). In this way, each time we build a file to manually change the code, in fact, we can set the default encoding file, in the future, we will not need to modify the code every time,

UTF-8

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. If you want to make the new project, Java files directly to UTF-8, you need to do the following:

1. Windows->preferences ... Open the Preferences dialog, navigate to the left navigation tree, navigate to General->workspace, right text file encoding, select Other, change to UTF-8, and later create a new project in its Properties dialog box, text file Encoding is the UTF-8.

2. Windows->preferences ... Open the Preferences dialog box, navigate to the left navigation tree, navigate to general->content Types, right context Types tree, point to each subkey in text, and enter "UTF-8" in, point update!

Other 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 be specified here.

Encoding format settings 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.