I am retrieving emails and some of my emails have utf encoded text. However even though my page is encoded as utf 8 – in some places when I try to out put utf text I get funny characters like:
=?utf-8?B?Rlc6INqp24zYpyDYotm+INin2LMg2YXYs9qp2LHYp9uB2bkg2qnbjCDZhtmC?=
=?utf-8?B?2YQg2qnYsdiz2qnYqtuSINuB24zaug==?=
Whereas in other areas of the same page it displays fine. What is going on?
It’s not “funny characters”, those are legitimate ASCII characters. It’s just that the string is MIME encoded for transport, so you’ll need to put it through
mb_decode_mimeheader.