The problem of *.FTL file garbled in Chinese

Source: Internet
Author: User

Original: http://lvxin3792002.blog.163.com/blog/static/128939280201081324839/

Today finally realized the use of the form provided by EXT, function, the contents of the database through the JSON display in the page, and then the page after the modified content of the Frompanel to use the Submit function to update to the database. But after the success, but found a very uncomfortable problem: the FTL file page display Chinese garbled.

MyEclipse is using the default GBK encoding: Can be viewed here: Window->preferences->workspace->text file encoding

STRUTS2 is configured so encoded in the configuration file: <constant name= "struts.i18n.encoding" value= "GBK"/>

Browser encoding mode Select GBK, the main page of the display of Chinese is correct, but the loading of the FTL page display Chinese is still garbled. This is because the default encoding format for the FTL file is GBK in background editing, but the encoding format it outputs becomes utf-8. In this way, Chinese will show garbled characters.

We can select an FTL file, right-click->properties->text file Encoding->other Select UTF-8, you will see this page in the MyEclipse display and the Web page to see the same garbled. We can change the format of the FTL file, the entire copy of the page into the TXT document, and then change the encoding format, and then copy the contents of the TXT file into the original file.

Browser inside refresh, Chinese will not show garbled.

The problem of *.FTL file garbled in Chinese

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.