Many novice do Web pages, sometimes found that the site title is garbled, the following is the method, is also a code to prevent errors
Usually the order we place is first title, then CharSet, just like this:
The code is as follows:
my page
First,the role of several encodings in Jsp/servletInJsp/servletin a4a PlaceYou can set the encoding (below), where the first two can be used only forJSP, the latter two can be used toJSPand theServletIn1,pageencoding= "UTF-8": SetJSPcompiled
In JSP, there is such a property pageencodingWhy? We all know that JSP is first translated into Servlet classes such as index_jsp.java during execution.Pageencoding is used in this translation. The Web container does not know the JSP file encoding
In fact, this is a kernel configuration problem, mainly because the file system is incomplete. Of course, the USB driver and mass storage/SCSI disk/vfat support should be selected. If not, refer to the following:
1. Prompt
Unable to load NLS charset
Problem descriptionThe front end uses Ajax to send a POST request to send JSON data, and spring MVC reports Content type ' Application/x-www-form-urlencoded;charset=utf-8 ' not supported for @RequestBody XXX ErrorSolutions1. Re-assemble the data
In php echo and header (content-type: texthtml; charsetuft-8); why can't they be used together? In php, add the header ("content-type: text/html; charset = uft-8"); in this sentence, the android client does not receive the data sent to the android
HTTP Header
Accept-charset represents the character set supported by the browser
Example: Accept-charset: ISO-8859-1, UTF-8; q = 0.7, *; q = 0.3
This browser prefers the following character sets
1) favorite ISO-8859-1
2) then UTF-8
3) The
JSP/Servlet ----- differences between charset and pageEncoding, and between jsp and servlet
I. Functions of several encodings in JSP/ServletIn JSP/Servlet, encoding can be set in four places (as shown below). The first two can only be used in JSP,
I configured & #039; DEFAULT_CHARSET & #039; & quot; UTF-8 & quot; globally, but it seems that the specific method still needs to be set again. why? I configured 'default _ charset' = "UTF-8" globally ",
But it seems that the specific method
1, request.setcharacterencoding () is the setting of the value taken from the request or the value taken from the databaseOnce specified, the correct string can be obtained directly through GetParameter (), and if not specified, the ISO8859-1
1, installing the character setFor example, installing cp036:1) Install cp936>CD c:\\sybase\charsets\cp936C:\sybase\charsets\cp936>charset-usa-ppassword-sserver BINARY.SRT cp9362) Query the character set ID of the cp936:Open the Program
Because of program goals, cssis used for sasscompilation. After compilation and completion of global.css and style.css, no problems were found in the local test. I thought this project was done successfully, but after being put online, a huge bug
Right syntax to use near 'using BTREE) ENGINE = InnoDB default charset = utf8' at line 6, btreeinnodb
When navicat for mysql 10.0.10 is used to restore the database backup generated on the server to the local database, the following problems occur:
After resin was upgraded to 3.1.3, some colleagues found that some JSP files (output XML format files) that were successfully run under resin 3.0.xx failed to compile:
1234567
500 Servlet exceptionxxxxx. JSP: 1: contenttype
Header usage
The Header () function sends an original HTTP header [HTTP header] to the client.The header is the string sent by the server before the server passes HTML data to the browser with HTTP co-meaning.Separate HTML files with a blank line.
Https://code.google.com/p/juniversalchardet/downloads/listJava porting Mozilla's Code Auto-detection library (source code for C + +), accurate rate is high.Check out the read-only version of the code through SVN:# Non-members may check out a
Using Navcat to import MySQL data from someone else, the following error was reported:[ERR] 1064-you has an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use the USING BTREE)
Pageencoding is the encoding of the JSP file itselfContentType CharSet refers to the content encoding when the server is sent to the clientJSP to pass two times "coding", the first stage will use Pageencoding, the second stage will use Utf-8 to Utf-8
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.