Name

CODEPAGE — <%@CODEPAGE= uintCodePage %>

Synopsis

Sets the character set (or code page) to be used to interpret the script on the server. Different languages and locales use unique code pages. This directive provides similar functionality for the interpretation of scripts on the server as the CodePage property of the Session object provides for client-side interpretation of the HTML sent to the client. However, it is important to note that the CODEPAGE preprocessing directive dictates how the script itself is interpreted, whereas the CodePage property of the Session object dictates how the resulting HTML is processed.

Parameters

uintCodePage

An unsigned integer value corresponding to a valid code page for the web server running the ASP script

Example

<%@ CODEPAGE=932%>

' This code sets the code page to OEM 932, which is
' used for Japanese Kanji.

Notes

You can have both the CODEPAGE directive and the CodePage property for the Session object in the same script. This results in the server-side script being interpreted using the unsigned integer set for the CODEPAGE directive and the client information being interpreted using the code page set of the CodePage property of the Session object.

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.