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
responseEncodingattribute. 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
requestEncodingattribute. The default isUTF-8. This attribute is optional.-
fileEncoding Specifies the encoding used to parse
.aspx,.asmx, and.asaxfiles. 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access