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 ...

Get ASP in a Nutshell, 2nd Edition 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.