Solved

£ being prefixed with  in email messages sent using CDO

Posted on 2012-04-02
3
512 Views
Last Modified: 2012-06-27
Hello,

I recently did a Windows 2003 Server update and since then, plain text emails sent from my website using CDOSYS prefix £ signs with Â, e.g. £

Furthermore, prior to the Windows update, plain text emails from my website were sent using a fixed pitch font (Courier or Courier New maybe). However, they are now sent using a variable font causing email content to be misaligned.

So, in summary...

1. I want to remove the £ and only display £
2. I want to send the email using a fixed pitch font.

Here is the ASP code I currently use to send the email...

Set myMail=CreateObject("CDO.Message")
myMail.From="xyz.abc.com"
myMail.To=varEmail
myMail.Subject="blah de blah"
myMail.TextBody=msgBody
myMail.Send
set myMail=nothing

Please note, I have tried adding the following line but it made no difference (i.e. £ remained in the emails)...

myMail.bodypart.charset = "utf-8"

I hope someone can help!

Regards,

Mark.
0
Comment
Question by:funasset
3 Comments
 
LVL 21

Expert Comment

by:Kim Walker
Comment Utility
There are no fonts in plain text emails, only characters. The font used to display plain text emails is set in the preferences of the email reader application.

It would help to see the contents of msgBody.
0
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 500 total points
Comment Utility
The problem with the pound sign if that you are using the wrong codepage. The data is stored in unicode, but you're codepage is set to windows-1252 or similar. Probably you've been using the server defaults and they've changed with the upgrade. http://www.w3schools.com/asp/prop_codepage.asp. This may well be causing your other problem e.g. additional spaces or similar because as xmediaman points out with plain text no font information is sent.
0
 

Author Closing Comment

by:funasset
Comment Utility
I set the codepage to 65001 and all is now well.

Thank you for your swift response.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now