Modify the default encoding for a eclipse/myeclipse project

Source: Internet
Author: User

Should be the cause of the Chinese operating system, the Eclipse default new project encoding is GBK, for the consideration of encoding support, the best unified requirements of the project team is the development of UTF-8 encoding.

Modify Eclipse's configuration to make the default encoding of Eclipse's new project direct to UTF-8

In the menu bar,

Window->preferences->general->workspace->text file Encoding

Change it to UFT-8.

This is one thing you should do immediately after installing eclipse.

However, this modification is only valid for the current workspace, and if you create or switch to a new workspace, you still have to do the same.

Same

Window->preferences->general->content types can modify the specific format of the default encoding of the file, especially the Html,css,javascript and other files are best to modify the encoding, Otherwise, the default iso-8859-1 cannot support Chinese.

Do not know how to solve the default installation is GBK the problem, must be in English operating system?

How about the myeclipse6.0? Unify all file encodings:

Windows---->preferences---->myeclipse---->file and editors----->jsp---> Select the encoding in this directory as the encoding you want to set (such as UTF-8)  
This way, the next time you create a new JSP page, you will default to the code you just set the  
Because by default, a new JSP page encoding is iso8859-1, is not able to save Chinese, to save Chinese will have to manually change to Gbk,utf-8 support Chinese encoding, each new to modify the manual modification of the code is very troublesome.  
With the above settings, you can unify the encoding of the entire project without having to manually set it up.

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.