How to solve Chinese garbled characters in GWT-ext-> formpanel

Source: Internet
Author: User

In the eclipse 3.4 gangmede development environment of J2EE, a gwt-ext project is created, modify the form-> simple source code in GWT-ext 2.0.6 showcase demo to write a logon box with the user name and password. The project runs normally, but the Chinese font on the Web page is garbled.

The cause of garbled code is: Eclipse project default encoding format is GBK, and GWT-ext related configuration using UTF-8 encoding format.

After you change the encoding format of the project to UTF-8 (Project-> properties-> text file encoding-> Other, select UTF-8), the Chinese font is correctly displayed on the page after the program runs.

But there is a need to pay attention to the problem: the engineering encoding format from GBK to UTF-8, the original normal display of the Chinese will be garbled display, need to re-enter the Chinese in the new encoding format.

Modify the default encoding format of the eclipse project: WINDOW> perferences> General> workspace> text file encoding> Other.

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.