encoding on the browser and sverver
we have 6 words to discuss:
Accept-Language
Accept-Charset (that two words is attributes of a request header )
requestEncoding
responseEncoding
fileEncoding
culture (that four words is attributes of globalization in webconfig )
i found no webbrowser send Accept-Charset attibute of request header to server. so i dont discuss it.
Accept-Language : i can get the attribute to know what html encoding context can be sent to client.
requestEncoding, responseEncoding,fileEncoding, culture : see from msdn:
fileEncoding |
Optional attribute. Specifies the default encoding for .aspx, .asmx, and .asax file parsing. Unicode and UTF-8 files that are saved with the byte order mark prefix are automatically recognized, regardless of the value for this attribute. |
requestEncoding |
Optional attribute. Specifies the assumed encoding of each incoming request, including posted data and the query string. If the request comes with a request header that contains an Accept-Charset attribute, it overrides this attribute in the configuration. The default encoding is UTF-8, which is specified in the globalization section in the Machine.config file that was created when the .NET Framework was installed. If request encoding is not specified in a Machine.config or Web.config file, encoding defaults to the Regional Options locale setting for the computer. In single-server applications, this attribute and the responseEncoding attribute should be the same. For the less common case (multiple-server applications where the default server encodings are different), you can vary the request and response encoding by using local Web.config files. |
responseEncoding |
Optional attribute. Specifies the content encoding of responses. The default encoding is UTF-8, which is specified in the globalization section in the Machine.config file that was created when the .NET Framework was installed. If response encoding is not specified in a Machine.config or Web.config file, encoding defaults to the Regional Options locale setting for the computer. In single-server applications, this attribute and the responseEncoding attribute should be the same. For the less common case (multiple-server applications where the default server encodings are different), you can vary the request and response encoding by using local Web.config files. |
uiCulture |
Optional attribute. Specifies the default culture for processing locale-dependent resource searches. For valid culture strings, see System.Globalization.CultureInfo. This attribute can also be set to auto. |