ASP Charset Attribute

response Object Reference Manual

The Charset attribute appends the character set name to the content-type header of the Response object.

Note:This attribute can accept any string, regardless of whether it is a valid character set name.

Syntax:

response.Charset(charsetname)
Parameter Description
charsetname A string that specifies the character set for the page.

Example

If the ASP page does not set the Charset attribute, then the content-type header will be like this:

content-type:text/html

If we have used the Charset attribute:

<%response.Charset="ISO-8859-1"%>

The content-type header will be like this:

content-type:text/html; charset=ISO-8859-1

response Object Reference Manual