Eclipse Chinese Character Display

Source: Internet
Author: User

How to set the character set of the editor in eclipse to better support Chinese characters? How does one solve the ISO8859-1 character set in eclipse? Make sure that the character encoding of these two sentences is consistent:

<% @ Page contenttype = "text/html; charset = UTF-8" Language = "Java" %>
<% @ Page Language = "Java" Import = "Java. util. *, Hy. *" pageencoding = "UTF-8" %>

Utf-8 or GBK.
$ $ Questions about graduation design: how does one solve the ISO8859-1 character set in eclipse?

 

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 writing JSP pages or Java classes using eclipse, you can directly enter Chinese characters on the pages, when saving the error message "character cannot match ISO-8859-1", because the ISO-8859-1 is English encoding, can not recognize Chinese characters, I want to change it to UTF-8, but I couldn't find a place where I could change the encoding. First, I opened the property of the project. In "info", I saw "text file encoding" and changed it to UTF-8 in the world. However, an error message still appeared, after a long time, I was still confused about it. I went online to find out if I had encountered such a problem. Most of the answers to this question are in "edit" --- "set encoding" (as if this is a 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 did not find perferences. I am dizzy ~~~~~~~~~,
check whether the encoding is set elsewhere.
I still cannot find ..........
back to perferences, I think the problem can be solved here. Haha, the problem is still here.
I found "general" -- "content types ",
there is a tree-like text on the right.
Expand and find "jsp". It was not found at first,
the guy is hiding at the lowest level ...........,
don't be careless,
there is a "default encoding" at the lowest,
the default is "ISO-8859-1",
finally found,
Delete "ISO-8859-1" and fill in "UTF-8",
click "Update",
OK. Save the file.
no error...

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.