How to correctly display utf encoded characters on my utf-8 encoded page?

Hi guys, I receive emails, and some of my emails have utf encoded text. However, even if my page is encoded as utf 8 - in some places, when I try to display utf text, I get funny characters, for example:

=?utf-8?B?Rlc6INqp24zYpyDYotm+INin2LMg2YXYs9qp2LHYp9uB2bkg2qnbjCDZhtmC?= 
=?utf-8?B?2YQg2qnYsdiz2qnYqtuSINuB24zaug==?=

While in other areas of the same page it is displayed normally. What's happening?

+3
source share
2 answers

These are not “funny characters,” they are legitimate ASCII characters. It's just that the MIME string is encoded for transport, so you need to pass it through mb_decode_mimeheader.

+6

, : =? , utf-8 , utf-8, B base-64.? = - . , base64_decode() , .

+1

Source: https://habr.com/ru/post/1747305/


All Articles