Garbled characters are displayed on the page after JSP compilation in linux
Source: Internet
Author: User
In linux, after JSP compilation, the page displays garbled characters-Linux Enterprise Application-Linux server application information. The following is a detailed description. This project is migrated from windows to linux. The system platform is redhat AS4 and the web server is weblogic8.1 sp6. After the project is migrated, You need to load the HTML file as a template. Then, you can use a prase class to parse the html file into a string and obtain information about each field. Then print the string through out. println (); at the front end. But when the front-end is displayed, all Chinese characters in the html file are changed ??
Later, I found a variety of solutions to Garbled text on the Internet, all of which were useless. Later I checked the user's Environment Information (command is set), found that his LANG = zh_CN.UTF-8, LANG into zh_CN.GBK to solve the problem, restart the machine (shutdown-r-t 5 now) because all the page codes in our project are configured as GBK, we do not know if we do not need to modify this environment parameter if all the page codes are configured as UTF8. Sometimes it is not a program issue, but a system issue.
Modify the LANG value in/etc/sysconfig/i18n, which is modified by all users. You can modify the current user in $ HOME /. modified In bash_profile to modify the current user's environment. You need to log on to the su-xxxx file again to make the change take effect.
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