Charset

The Charset property appends the name of the character set (for example, ISO-LATIN-7) to the content-type header in the response object.

Syntax

Response.Charset(CharsetName)
 

Parameters

CharsetName
A string that specifies a character set for the page. The character set name will be appended to the content-type header in the Response object.

Example

For an ASP page that did not include the Response.Charset property, the content-type header would be.

content-type:text/html

If the same .asp file included

<% Response.Charset("ISO-LATIN-7") %>

the content-type header would be

content-type:text/html; charset=ISO-LATIN-7
 

Remarks

This function inserts any string in the header, whether it represents a valid character set or not.

If a single page contains multiple tags containing Response.Charset, each Response.Charset will replace the previous CharsetName. As a result, the character set will be set to the value specified by the last instance of Response.Charset in the page.

On the Macintosh, the default U.S. character set is not ISO-LATIN-1. When serving up documents, Personal Web Server for Macintosh automatically converts from the Macintosh character set to ISO-Latin-1. In the U.S. version, all pages are assumed to be in the U.S. Macintosh character set unless the Response.Charset is used. If Response.Charset is used to change the character set, Personal Web Server for Macintosh does not convert the character set.

Applies To

Response Object