Problems with the server character set--utf-8

Source: Internet
Author: User

The deployment project on the server, there is a problem, a function point garbled problem, looked for a long time, finally solve the problemStep one: Using local code to find the problem, set debug in code, output, use Java code by getting local character set problems: (Get local eclipse is GBK)String encoding = System.getproperty ("file.encoding");System.out.println ("Default System Encoding:" + Encoding);Step Two:setting character set issues in Eclipse            UTF-8 settings 1.windows->preferences in Eclipse opens the Preferences dialog box; 2. Then, General->workspace, the right text file enc            Oding, choose Other, change to UTF-8. 3.web-> Open, CSS, HTML, JSP, JavaScript, XML and other settings to UTF-8.or change here, general->content Types, on the right side of the context types tree, click Text, select Java Source File, under Defaultenter UTF-8 in the Encoding input box and click Update to set the Java file encoding to UTF-8. The other method is the same if you need to change. 4.java->installed JREs. Remove the Jdk6.0 from the original eclipse, and from the new configuration jdk1.6.0_06 (ADD: Under the Java file in C drive, Programe. C:\Program Files\java)
Step three: To regain the local character set problem, you can solve the problem. Step four: Redeploy on the server. It's OK.

Another scenario: When uploading a file, set the CharSet: Utf-8.
Reference Documentation: http://rebecca.iteye.com/blog/654953

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Problems with the server character set--utf-8

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.