Name
CodePage —
Session.CodePage
(=
intCodePageValue
)
Synopsis
Specifies or retrieves the code page that will be used by the web server to display dynamic content in the current script. A code page is a character set containing all the alphanumeric characters and punctuation used by a specific locale.
Parameters
-
intCodePageValue An unsigned integer corresponding to a specific character set installed on the server. Setting the CodePage property will cause the system to display content using that character set. The following table lists only a few of the possible valid values for this parameter:
|
CodePage Value |
Language |
|---|---|
|
932 |
Japanese Kanji |
|
950 |
Chinese |
|
1252 |
American English (and most European languages) |
Example
<% ' In the following code, assume that the original code ' page setting is 1252 for American English. The ' example demonstrates the use of the CodePage property ' of the Session object to temporarily set the character ' set to Chinese so the text sent to the browser uses the ' Chinese character set: Dim uintOrigCodePage Dim uintChineseCodePage uintChineseCodePage = 950 uintOrigCodePage = Session.CodePage Session.CodePage = uintChineseCodePage %> ' +-----------------------------------------------------------+ ' | This text is sent to the client browser using the | ' | Chinese character set. | ' +-----------------------------------------------------------+ <% ' Remember to reset your CodePage property if you don't want ' the rest of of the text created and placed into ...
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