Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDOSYS & International Characters

Status
Not open for further replies.

astrodestino

IS-IT--Management
Feb 19, 2005
179
AR
Hi!
I made a send mail page for the user to contact me, the problem I have is that some characters cannot be seen in outlook.
Characters like this: á é í ñ, etc
I see them in the html but are not displayed, for example, I see: á instead of á
can that be fixed?
This is my code:
Code:
<% 

msg=msg & "Razon Social: " & request.querystring("razonsocial") & "<br>"
msg=msg & "Nombre: " & request.querystring("nombre") & "<br>"
msg=msg & "Telefono: " & request.querystring("telefono") & "<br>"
msg=msg & "Email: " & request.querystring("email") & "<br>"
msg=msg & "Pais: " & request.querystring("pais") & "<br>"
msg=msg & "Consulta: " & replace(request.querystring("consulta"),vbcrlf,"<br>")
    Set MailObj = CreateObject("CDO.Message")
    MailObj.From = request.querystring("email")
    MailObj.To = "aformanek@grupofn.com"
    MailObj.Subject = "Contacto BAInews"
    HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
    HTML = HTML & "<html>"
    HTML = HTML & "<head>"
    HTML = HTML & "<title>Message</title>"
    HTML = HTML & "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    HTML = HTML & "</head>"
    HTML = HTML & msg
    HTML = HTML & "</body>"
    HTML = HTML & "</html>"
    MailObj.HTMLBody = HTML
   ''MailObj.TextBody =msg
    MailObj.Send
    Set MailObj=nothing %>
 
try using Server.HTMlEncode() function...

after getting your message string built...do this..

msg=Server.HTMLEncode(msg)

then pass this msg...

or do it for each querystring...

Server.HTMLEncode(request.querystring("email"))...etc...

-DNG
 
Tnx but I still get the same result.
Before I could read á in the html code, now I read &#195;&#161; and the displayed HTML reads á
:(
 
ok sorry i misread your post...you should have something like this to read the international characters correctly...

Response.CodePage = 65001
Response.CharSet = "utf-8"

Response.CodePage = 1252
Response.CharSet = "windows-1252"


make sure you have all the CodePage, CharSet etc are assigned properly..

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top