Eclipse modifies the default encoding

Source: Internet
Author: User

It should be the reason of Chinese operating system, Eclipse's default new project code is GBK, out of consideration of coding support, it is best to unified requirements in the project team is UTF-8 coding for development.

Modify the eclipse configuration so that the default code of Eclipse's new project is directly UTF-8

In the menu bar

Window-> preferences-> General-> Workspace-> text file encoding

Change it to UFT-8.

This is one thing that should be done immediately after eclipse is installed.

However, this modification is only valid for the current workspace. If you create or switch to a new workspace, you still have to perform the same steps.

Similarly

In window-> preferences-> General-> content types, you can modify the default encoding of files in different formats, especially HTML, CSS, JavaScript, and other files, otherwise, the default iso-8859-1 cannot support Chinese characters.

I don't know how to solve the problem that GBK is installed by default. Do I have to use an English operating system?

How to unify all file encoding in myeclipse6.0:

Windows ----> preferences ----> myeclipse ----> file and editors -----> JSP ---> select encoding under this directory as the encoding you want to set (such as UTF-8)

In this way, the next time you create a new JSP page, the encoding you just set will be used by default.
Because the default situation to create a new JSP page encoding is ISO8859-1, can not save Chinese, to save Chinese have to manually change to GBK, UTF-8 support Chinese encoding, it is troublesome to manually modify the encoding every time you create a new one.

After the above settings, You can unify the coding of the entire project without manual settings.

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.