Re: Problem with unicode (Chinese) email sent using ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mandar (mandar.date_at_gmail.com)
Date: 09/20/04


Date: Mon, 20 Sep 2004 06:55:03 -0700

Viatcheslav,

Thanks a lot.

Following solution worked!!!

Response.Codepage = 65001
Response.Charset = "utf-8"

I could successfully send unicode characters in email.

But there is a problem in viewing unicode characters in subject line when
viewed in Microsoft Outlook, though unicode characters are displayed
correctly in the message body. The subject shows "?? ??? ??? ????, ??? ??
???? ????".

Is there any setting or code change required to correct this.

Thanks and Regards,
Mandar Date

"Viatcheslav V. Vassiliev" wrote:

> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> This means that browser should read page as encoded in UTF-8 but does not
> says ASP to encode page as UTF-8. Try
>
> <% @Codepage="UTF-8"%>
>
> (no space between <% and @) after @Language, or add in code (before any of
> Response.Write):
>
> Response.Codepage = 65001
> Response.Charset = "utf-8"
>
> //------------------------------------
> Regards,
> Vassiliev V. V.
> http://www-sharp.com -
> Scripting/HTA/.Net Framework IDE
>
> "Mandar" <mandar.date@gmail.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> news:8BBA4D49-304C-4807-A785-9AA332FECEEE@microsoft.com...
> > Hi
> >
> > I am trying to send Chinese ( Unicode) Email through ASP CODSYS object. I
> > have set message encoding as UTF-8.
> > But the email sent through the page is displaying garbage when viewed in
> > Outlook express or any other email services. The ASP code is as follows:
> >
> > Can anybody help me on this?
> >
> > Thanks and Regards,
> > Mandar Date
> >
> >
> > <%@ Language=VBScript %>
> > <HTML>
> > <HEAD>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> > <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
> > </HEAD>
> > <BODY>
> > <form method=post>
> > <input name=subject>
> > <input name=message>
> > <input name=posted type = submit value = 'Send'>
> > <%
> > dim iconf
> > dim flds
> > set iconf=server.CreateObject("CDO.Configuration")
> > set flds=iconf.Fields
> > flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
> >
> >
> flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirecto
> ry") = "c:\inetpub\mailroot\pickup"
> >
> > flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
> > flds.update
> >
> > if request("posted") <> "" then
> > Dim objMail
> > Set objMail = Server.CreateObject("CDO.Message")
> > objMail.Configuration=iconf
> > objMail.From = "mandar.date@patni.com"
> > objMail.To = "mandar.date@patni.com"
> > objMail.cc = "mandar.date@gmail.com"
> > objMail.bcc = "datemandar@yahoo.com;mandar.date@india.com"
> > objMail.Subject = request("subject")
> > objMail.BodyPart.Charset = "UTF-8"
> > objMail.TextBody = request("message")
> > objMail.Send
> > Response.write "Message was sent with subject " & request("subject") & "
> > and body " & request ("message")
> > end if
> > %>
> > </form>
> > </BODY>
> > </HTML>
> >
>
>
>



Relevant Pages

  • Re: How do I get symbols to display in mail merge
    ... In discussions today we were thinking about using utf-8. ... Use the word doc as the datasourse. ... Dim c1 As String * 1 ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Any plans to clean up the spam on this group?
    ... especially UTF-8 (as it provides the smallest footprint ... as encoding but then you have to escape all Unicode characters that are not ... As the XHTML markup is declared text/html, the XML declaration (which should ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)
  • Re: eval and non-English characters conflict?
    ... Your page is in ISO 8859-1 encoding but ... It is alas because UTF-8 is not the indication of the actual encoding ... Unicode characters 0-127 have the same code value as the corresponding ... In attempt to read this sequence in full it ...
    (comp.lang.javascript)
  • Encoding-Problem: Gathering a UTF-8 microsoft.xmlhttp file from a Webserver saving as unicod
    ... I have a problem with a UTF-8 XML file requesting from a web server ... via the enclosed script. ... If I open the copied file via Notepad++ and save it as UTF-8 the file ... Dim TargetPath ...
    (microsoft.public.scripting.vbscript)
  • Re: Export table to UTF-8 textfile
    ... Normally one would do this by creating a query that formats the data the way ... As far as I know there's no other built-in way of getting from Unicode text ... memo field to UTF-8. ... Dim RS As Recordset ...
    (microsoft.public.access.externaldata)