html email problem
I am sending emails to my members however the email is coming out wrong in Gmail, have a look below:
Originial
log into your account now » Someone has just sent you a Smile on Penpal Parade. To read it please log into your account and then click on "messages". Don't forget to like us on开发者_StackOverflow社区 Facebook!
Gmail (and probably others)
log into your account now » Someone has just sent you a Smile on Penpal Parade. To read it please log into your account and then click on “messages†. Don’t forget to like us on Facebook!
Any idea on how to fix this?
Yes, use UTF-8 character encoding always. This looks like the typical "paste from word" miscoding.
You've got a character set mismatch. The Â
shows up when you've got UTF-8 source but some other output, like ISO-8859.
... and don't you mean "is coming out WRONG in gmail"?
It's always best to replace special HTML characters.
Common ones are:
™ = ™
& = &
" = "
© = ©
» = »
« = «
£ = £
Larger reference: http://www.w3schools.com/tags/ref_entities.asp
As said earlier this usually happens when copying and pasting from Word, I usually copy from word to Windows Note Pad and then I do a manual entity replace.
There is also on-line tools you can use:
Google "html encoding tool"
精彩评论