Solved

£ being prefixed with  in email messages sent using CDO

Posted on 2012-04-02
3
515 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 22

Expert Comment

by:Kim Walker
ID: 37795653
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
ID: 37795666
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
ID: 37795691
I set the codepage to 65001 and all is now well.

Thank you for your swift response.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

863 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

18 Experts available now in Live!

Get 1:1 Help Now