PHP Email

can't get a symbol to appear in plain text

Page 1 of 1

2 Replies - 957 Views - Last Post: 09 August 2010 - 12:32 PM Rate Topic: -----

#1 Scotty G  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 59
  • Joined: 09-April 10

PHP Email

Posted 09 August 2010 - 11:57 AM

Hello Everyone,

I am trying to generate an email using php. I have the html section of the email working great but I am having an issue with the plain text. I have a php string that has Registered trademark symbol in it. The Content type im using for the email is
Content-Type: text/plain; charset=utf-8


The string looks like this:
$email .= "Software Name ®";


but when I get the email the string appears as:

Software Name ?

I'm not really sure why this is happening. I'm wondering if anyone else out there has ever pumped into this?

Any insight would be great, thanks

-Scotty G

This post has been edited by Scotty G: 09 August 2010 - 11:58 AM


Is This A Good Question/Topic? 0
  • +

Replies To: PHP Email

#2 danny_kay1710  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 29
  • View blog
  • Posts: 359
  • Joined: 27-April 08

Re: PHP Email

Posted 09 August 2010 - 12:26 PM

I'm not sure if plain text supports that symbol.

Maybe consider replacing it with a plain text alternative ® maybe?
Was This Post Helpful? 0
  • +
  • -

#3 Scotty G  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 59
  • Joined: 09-April 10

Re: PHP Email

Posted 09 August 2010 - 12:32 PM

Thanks for the reply danny_kay1710, I actually tried that it didn't seem to work. For anyone else that is interested I did figure it out. I just used php's html_entity_decode() function and got it to work that way. So for future reference if anyone is having troubles getting symbols here is an example below generating a plain text ®.

$sym = "&#0174";
$var = "Software Name ".html_entity_decode($sym, ENT_NOQUOTES, 'UTF-8');


this outputs

Software Name ®

hope this helps some one out there.

-Scott

This post has been edited by Scotty G: 09 August 2010 - 12:34 PM

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1