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.

 

转载于:https://www.cnblogs.com/liyou-blog/archive/2011/01/24/1943394.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值