开发者

HTML Entities in email from php mail()

I'm having a strange problem trying to get an HTML email campaign to render the proper text I need.

I'm the legalese at the bottom of my email, there are instances where I need to add a trademark symbol. I've converted all those instances to开发者_JAVA技巧 ™, $#0153; or ™, and when I run the mail script locally, everything looks as it should, however when I run the script on the intended server, all those trademark instances show an empty box character instead.

I should note that elsewhere on the email, I'm using other HTML entities that render fine... –, ’, “ - No problems, only this damn ™ thats driving me crazy.

The offending code:

....DisplayPort™ connectors, and/or DisplayPort™ compliant....

renders as

HTML Entities in email from php mail()


Problem Solved!

Apparently you can also use the entity code ™ for a trademark, which I was unaware of. It still doesnt explain why any of the other entity codes didn't work, but it has provided me with a working solution, so I'm calling this question answered.

Thanks to all for your help, much appreciated.


Check what character sets your "home" server and the "intended" server are using. If they're mismatched (like utf-8 at home, but latin-1 at work), that'd trash any of the non-standard ascii characters like the copyright symbol.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜