Welcome to WebmasterWorld Guest from 54.146.217.179

Forum Moderators: ocean10000

Message Too Old, No Replies

Special Characters with cdoSYS?

I still can't get an to show up in emails - any help please?

     
3:15 pm on Apr 8, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 13, 2004
posts:97
votes: 0


Hi folks.. i'm just going to re-post this message that I posted before since I still can't sort out the problem and the system has closed the old message, so if there were anybody out there with a gleam of insight for me, they couldn't tell me! :-)

--<original post>--

I have a simple email form on a french-language website. It does not use a database - it just uses cdosys to obj.message off an email to the address specified in objMessage.To

I have set the code base of the page as follows:

<%session.CodePage=65001%>
<% Response.Charset = "UTF-8"%>

When somebody completes the form using special characters such as or or or or whatever - it turns up in the sent email without difficulties..

However, the text that the email form itself creates (such as the subject line of the email or body text) doesn't want to generate these characters.

for example: in the email that the recipient receives I want to title a section of the email: "The name of the sender is": <the name entered on the form>

of course.. I want to do this in French so the actual code is:


mailtext = "Dear " & strGreetingName & "," (...extra removed) &vbcrlf& "Le nom d'Expediteur: " & str_name

The word Expediteur should have an accute accent over the 2nd e like this: "Le nom d'Expditeur:" -

I've tried just typing it directly as: and it shows up in the email as gobbeldy-gook (technical term).. I've tried typing it in as &eacute; - and it shows up in the email as "d'Exp&eacute;diteur" .

I googled my question, but wasn't able to find an answer..

Does anybody have any ideas? Right now I've taken out the special characters entirely and just typed their 'normal' similars.. (ie: just an e instead of one with an accent) - but I would like the emails received by my client to be correctly spelled if possible

?

thanks!

stratus

5:50 pm on Apr 8, 2007 (gmt 0)

New User

5+ Year Member

joined:May 4, 2006
posts: 13
votes: 0


As you are trying to send a non-english text through CDOSYS,
please consider setting your cahrset to utf-8.
for example:
objEmail.BodyPart.Charset = "utf-8"
objEmail.TextBodyPart.Charset = "utf-8"
objEmail.HTMLBodyPart.Charset = "utf-8"
4:03 am on Apr 9, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:506
votes: 0


It's kind of a hack but have your tried writing out the ascii encoded character? Build the mailtext string and then do a replace on all the 's with a Chr(233).

mailtext = Replace(mailtext,"",Chr(233))

8:24 am on Apr 24, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 13, 2004
posts:97
votes: 0


shahab


As you are trying to send a non-english text through CDOSYS,
please consider setting your cahrset to utf-8.
for example:
objEmail.BodyPart.Charset = "utf-8"
objEmail.TextBodyPart.Charset = "utf-8"
objEmail.HTMLBodyPart.Charset = "utf-8"

I had no idea that that was an option for objEmail.. none whatsoever.. and I searched all over the web for something just like that! GREAT! i'm going to go try it right now!

I've got utf-8 set all over the rest of the site.. in the asp everywhere.. but not there .. i'm excited!

Thanks for the advice!

St.