views:

167

answers:

1

Hi guys I've shifted to using the zend framework for reading messages from an inbox however when reading some html messages I see a lot of weird charcters like:

don’t

looks like

don=92t 

Plus other weird characters like =20 .. whats going on? Is it an ecoding issue? How do I fix it?

+3  A: 

Welcome to the wonderful world of quoted-printable encoding: You'll need to decode the quoted-printable string.

Guildencrantz
WOW! Thats spot on - but how can I set it up to detect whether its a quoted printable string BEFORE decoding? Or would running a decode quoted printable on any string have no effect unless it is quoted printable?
Ali
You should be able to check the `content-transfer-encoding` to see if it's quoted-printable, but I'm not sure how to do that in Zend off the top of my head.As for just decoding strings: If the string contains a quoted-printable sequence (such as `=92`), but it isn't actually quoted-printable (the sender actually wants you to see '=92'), then you'd have a problem, otherwise you'd be fine.
Guildencrantz