Would you like to convert the following raw message according to the plain text of UTF-8:
=? utf-8? Q? Schuker_hat_sich_vom_ = C3 = 9Cbungsabend_ (01/01/2012) _abgem? = =? utf-8? Q? eldet? =
The real text for this:
Schuker hat sich vom Übungsabend (01.01.2012) abgemeldet
My first conversion approach:
$mime = '=?utf-8?Q?Schuker_hat_sich_vom_=C3=9Cbungsabend_(01.01.2012)_abgem?= =?utf-8?Q?eldet?='; mb_internal_encoding("UTF-8"); echo mb_decode_mimeheader($mime);
This gives me the following result:
Schuker_hat_sich_vom_Übungsabend_ (01.01.2012) _abgemeldet
(Questions here: What am I doing wrong? Why do these underscores occur?)
My second conversion approach:
$mime = '=?utf-8?Q?Schuker_hat_sich_vom_=C3=9Cbungsabend_(01.01.2012)_abgem?= =?utf-8?Q?eldet?='; echo imap_utf8($mime);
This gives me the following (correct) result:
Schuker hat sich vom Übungsabend (01.01.2012) abgemeldet
Why does it work? What method should I rely on?
The reason that I ask is that I have previously asked another question the subject matter associated with the expansion of e-mail messages where mb_decode_mimeheader was the solution, but here imap_utf8 - this is the way to go, as I can guarantee that all of these examples will be corrected properly :
=? utf-8? Q? Schuker_hat_sich_vom_ = C3 = 9Cbungsabend_ (01/01/2012) _abgem? = =? utf-8? Q? eldet?
and
=? UTF-8? B UmU6ICMyLUZpbmFsIEFjY2VwdGFuY2UgdGVzdCB3aXRoIG5ldyB0ZXh0IHdpdGggU2xvdg ==? = =? UTF-8? B YWsgaW50ZXJwdW5jdGlvbnMgIivEvsWhxI3FpcW + w73DocOtw6khxYgi? =
Should give me the expected results:
Schuker hat sich vom Übungsabend (01.01.2012) abgemeldet
and
Re: # 2-Final acceptance test test with new text with Slovak interferences "+ ľščťžýáíé! Ň"