£ in plain text email subject

I just tried everything to get a £ into the subject of a plain text email - one being sent by mail(). Does anyone have any code for sending plain text characters to they display correctly in the email software please? Thanks.

?

I’m having a character encoding issue. The answer will be some sort of PHP which allows £ to be displayed in the subject of an email correctly, rather than X or Xa3 or some other gobbledegook characters.

Use GBP instead.

Pound signs have given me problems since trying to configure Epson FX-80 clones to print properly, plain text will be the issue and if you just use character 156 (I think) you might end up with issues based on the recipients character sets.

ETA: a quick search suggests you need to look at encoding the mail headers with UTF8 to make this work. Also that a lot of spam filters use currency symbols in the mail subject to be a bad thing.

Yes the UTF8 email header is one of the things I tried.

The funny thing is I did this a while ago and it worked fine (without UTF8 headers). Coincidentally, I just received an email from someone else with a pound sign in the subject line, and I looked at the headers of that email and it has no encoding info – that’s how it used to work for my PHP code but not now.

Something must have changed. The pound sign is coming out as an X.

It’s an email for myself, the server is sending it to me. It’s not that important apart from it’s annoying the hell out of me.

Have you tried encoding it like so?

&#1[COLOR="#000000"]63;[/COLOR]

or

&po[COLOR="#000000"]und;[/COLOR]

I did just to make sure it wouldn’t work: those are good for HTML, this is plain text. Thanks.

Hmm, some code I made ages ago, which used to put £ in the subject line fine (plain text email, no encoding email headers, pound sign in the code literally, as is) just sent me an email and the pound sign is an X. What’s changed recently is the hosting of my email; same address, different host. Nothing else has changed. Weird.

Hmm, interesting: I just re-examined the email which I said someone else sent, and realised I missed something. No, there’s no encoding headers, but the subject, which contains a pound sign, is like so:

Subject: =?utf-8?Q?Due_to_popular_demand!_Additional_fully_funded_SFEDI?=
=?utf-8?Q?Social_Media_for_Business_course_worth=c2=a33,000?=

I guess the answer is in there.

Tis weird that changing email hosting company would change £’s to X’s though.