PHP: =0D, =A20 symbols

前端 未结 1 1754
北恋
北恋 2021-01-28 15:27

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(\'=A2         


        
相关标签:
1条回答
  • 2021-01-28 15:33

    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

    0 讨论(0)
提交回复
热议问题