Save cocould not be completed. Solve the Problem of eclipse Internationalization

Source: Internet
Author: User

Enter Chinese characters in the newly created JSP file, save the file, and report an error (encoding problem). The article was found in the Forum to solve the problem. Therefore, the article was reprinted.

<% @ Page Language = "Java" Import = "Java. util. * The content in the pageencoding attribute in "pageencoding =" ISO-8859-1 "%> must be consistent with the default encoding method in solution 1. Otherwise, garbled characters may occur.

The original article is as follows:

Create a messagebundle in myeclipse. properties file. If you enter Chinese characters for saving, an error will be prompted: Save cocould not be completed. reason: some characters cannot be mapped using "ISO-8859-1" character encoding. either change the encoding or remove the characters which are not supported by the "ISO-8859-1" character encoding.

Solution 1:

Open the preferences of Eclipse, choose general-> content types, and then modify the right side of the text under the Java properites file encoding method of the default UTF-8, click Update on it!

Solution 2:

1. The Jinto plug-in of eclipse should be used for editing. The native2ascii code of Java will be called automatically to transcode the file.

Jinto plug-in download: http://www.guh-software.de/jinto.html

2 2 eclipse --> preferences... --> in the "Type Filter text" column, enter "content types" for search, and then select

Modify the code of the corresponding file suffix under text on the right.

Then manually call native2ascii to compile the messagebundle_zh_cn.proterites File

Attachment: Install the properties editor in eclipse

In eclipse, "help" --- "Software Update" -- "find and install" -- "search for new feature components to be installed" --- "Next" --- "create remote site "---

Enter "name": Properties editor;

The URL is http://propedit.sourceforge.jp/eclipse/updates,

Let it download the plug-in by itself ..

Find the appropriate properties editor for installation. This plug-in reduces conversion to UTF-8 format and is automatically converted in struts.

In this way, you can install some Eclipse plug-ins by yourself.

 

From: http://macleo.javaeye.com/blog/661289

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.