Sending Emails With Non ASCII Characters From Classic ASP


To have an ASP page send an email with non-ASCII European text (Cyrillic, Greek, Czech, etc) you’ll need to use UTF-8.

Saving Source Files As UTF-8

First all, make sure you save the actual ASP files itself as UTF-8, and make sure it is the correct type of UTF-8 (i.e., not “UTF-8 no BOM”). To do that in Dreamweaver, bring up the Page Properties menu (cmd/ctrl J or Modify > Page Properties…), select the Title/Encoding tab, and make sure you have UTF-8 selected and the BOM ticked. Then you need to specify the character encoding for the page itself. If you saved the page as UTF-8, then you can use the codepage attribute in the language tag as follows: <%@ Language=JScript CodePage=65001 %>

Alternatively, if you are not able to save pages in UTF-8 and session management is on, you can use a the CodePage attribute of the Session object, which allows the response to be different from the encoding of the file itself. <% Session.CodePage=650001 %>

Although not essential, you may also want to set the character set explicity, both in the Response object and as a meta tag: Response.Charset="UTF-8"

and as a meta tag: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Saving A Mail Message As UTF-8 WIth CDO.Message

The above will ensure your web page is served properly. But what about the email content? If you use CDO.Message to send emails, then it is pretty simple - just use set the charset property: