First of all, if you look at the following code is somewhat confusing, it is recommended to read the following msdn on the platform call of the specified character set article: http://msdn.microsoft.com/zh-cn/library/7b93s42f.aspx
Learning. net (C
Spring mvc3.1 @ ResponseBody annotation generates a large number of Accept-Charset
Spring 3 MVC uses @ ResponseBody and generates a large response header (the Accept-Charset will reach 4 K +), because StringHttpMessageConverter by default.
Differences between contenttype, charset, and pageencoding
========================================================= ==================
The contenttype attribute specifies the HTTP content type of the response. If contenttype is not specified, the
Introducedjava中使用Charset来表示编码对象 this class defines methods for Creating decoders and Encoders and for retrieving The various names associated with a charset. Instances of this class is immutable. This class also defines static Methods
Use java. nio. charset. CharsetDecoder to automatically recognize character sets, charsetdecoder
The methods for automatically recognizing character sets that can be found on the Internet are studied. The effective method is to use the third-party
Imread)
Http: // 127.0.0.1/bom.html
Set header to: Content-Type: text/html; charset = UTF-8
Page content:
Specifically, bom.html is encoded as unicode. That is, the BOM on this page is ff fe.
Use IE Chrome Opera Firefox to access this page.
We can
The GetBytes () method of the string is to get a string of byte arrays, which is well known. However, it is important to note that this method returns a byte array of the operating system's default encoding format. If you do not take this into
Spring mvc3.1 @ ResponseBody annotation generates a large number of Accept-Charset, responsebody
Spring 3 MVC uses @ ResponseBody and generates a large response header (the Accept-Charset will reach 4 K +), because StringHttpMessageConverter by
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.
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
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.