|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75979 mb_encode_mimeheader invalid MIME quoted-printable
Submitted: 2018-02-18 20:12 UTC Modified: 2020-02-13 22:35 UTC
From: azurit at pobox dot sk Assigned: cmb (profile)
Status: Not a bug Package: mbstring related
PHP Version: 7.2.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: azurit at pobox dot sk
New email:
PHP Version: OS:


 [2018-02-18 20:12 UTC] azurit at pobox dot sk
Function mb_encode_mimeheader is NOT quoting a colon character (:), which is against RFC, see:

See also this very same Thunderbird bug:

Test script:

echo mb_encode_mimeheader("test:test", "UTF-8", "Q");


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-13 22:35 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-02-13 22:35 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

While it is correct that a colon must be quoted inside an
encoded-word, there is no need here to construct an encoded-word,
and so this is not done.  Compare this with

    mb_encode_mimeheader("tést:tést", "UTF-8", "Q")

which needs to construct an encoded-word (due to the non ASCII
characters), and therefore evaluates to

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 19:01:28 2024 UTC