Name
<globalization>
Synopsis
<globalization requestEncoding=encodingString responseEncoding=encodingString fileEncoding=encodingString culture=cultureString uiCulture=cultureString />
Provides attributes for configuring encoding and culture settings. These attributes are used as the basis for the expected encoding of requests, responses, and files for internationalization.
Scope
Any
Attributes
-
requestEncoding
Specifies the assumed encoding of incoming requests. This can be any valid encoding string and should match the
responseEncoding
attribute. The default isUTF-8
. This attribute is optional.-
responseEncoding
Specifies the content encoding of responses. This can be any valid encoding string and should match the
requestEncoding
attribute. The default isUTF-8
. This attribute is optional.-
fileEncoding
Specifies the encoding used to parse
.aspx
,.asmx
, and.asax
files. This attribute is optional.-
culture
Specifies the assumed culture for incoming requests. The value can be any valid culture string. This attribute is optional.
-
uiCulture
Specifies the culture for locale-specific resource searches. The value can be any valid culture string. This attribute is optional.
Child Elements
None
Example
This example shows how the default
<globalization>
settings are configured in
web.config
:
<configuration> <system.web> <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> </system.web> </configuration>
Notes
A list of valid culture strings can be found in the .NET Framework documentation ...
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.