luqita
luqita

Reputation: 4077

PHP: =0D, =A20 symbols

After obtaining info from an email body, I have a lot of symbols such as =0D, =A20, etc... How can I remove them? I do not want to use

$body = str_replace('=A20', '', $body);

because if the email body actually contains that it will be replaced.

Any ideas? Thanks!

Upvotes: 0

Views: 163

Answers (1)

Dutow
Dutow

Reputation: 5668

Don't replace them to nothing - thoose characters aren't nothing, they are part of the text.

E-mail messages aren't plain text, they are encoded. Thoose examples are part of the quoted-printable encoding, which you can identify by the

Content-Transfer-Encoding: quoted-printable

line at the beginning of the e-mail message.

And php has a method to decode it

Upvotes: 2

Related Questions