Solution to the ISO8859-1 character set in Eclipse

Source: Internet
Author: User

First problem:

When writing JSP, database operations are involved in it.
Save cocould not be completed
The reason is some characters cocould not be mapped using iso8859-1

<% @ Page language = "java" pageEncoding = "GBK" %>
Set it to GBK or UTF-8, as long as it supports Chinese KO

Second problem:
When compiling jsp page or JAVA class with eclipse, enter Chinese characters directly in the page, save the error prompt "character cannot match ISO-8859-1", because the ISO-8859-1 is English encoding, I want to change it to UTF-8 because it cannot recognize Chinese characters, but I cannot find a place that can change the encoding. First, I open the properties of the project, in "info", we can see that "Text file encoding" is changed to UTF-8 in the world, but there is still an error message. After a long time, we can't decide whether to change it, no one has ever encountered such a problem. The answer to this question is mostly in "edit" --- "set encoding" (as if this is temporary encoding for a separate file ), however, I did not find it in eclipse (I used 3.2, but I don't know why). Later I found another explanation: Set the default encoding:
Window --> preferences --> general --> editor --> text file encoding,
I still cannot find perferences. I am dizzy ~~~~~~~~~,
Next, let's see if there are any encoding settings in other places,
Still not found ..........
Back to perferences, I think the problem can be solved here,
I found "General" -- "Content Types ",
There is a tree text on the right,
Expand and find "JSP", not found at first,
That guy is hiding at the lowest level ...........,
Don't be careless,
"Default encoding ",
The default "ISO-8859-1 ",
Finally,
Remove "ISO-8859-1" and fill in "UTF-8 ",
Click "update ",
OK. Save,
There is no error ..............

 

This article from CSDN blog: http://blog.csdn.net/xinew/archive/2010/08/06/5794386.aspx

From:

Http://www.cnblogs.com/king1302217/archive/2011/04/18/2019994.html

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.