homepage Welcome to WebmasterWorld Guest from 54.235.36.164
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Special Characters with cdoSYS?
I still can't get an to show up in emails - any help please?
Stratus42




msg:3305616
 3:15 pm on Apr 8, 2007 (gmt 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

 

shahab




msg:3305697
 5:50 pm on Apr 8, 2007 (gmt 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"

duckhunter




msg:3306004
 4:03 am on Apr 9, 2007 (gmt 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))

Stratus42




msg:3319721
 8:24 am on Apr 24, 2007 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved