|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35236 mb_encode_mimeheader() doesn't properly encode to QP
Submitted: 2005-11-16 11:07 UTC Modified: 2005-11-16 12:04 UTC
From: misiek at dione dot ids dot pl Assigned:
Status: Closed Package: mbstring related
PHP Version: 5.0.5 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: misiek at dione dot ids dot pl
New email:
PHP Version: OS:


 [2005-11-16 11:07 UTC] misiek at dione dot ids dot pl
I'm testing with php5-STABLE-200511160740.

[arekm@pepe php5-STABLE-200511160740]$ ./sapi/cli/php ~/a.php
[arekm@pepe php5-STABLE-200511160740]$ ./sapi/cli/php --version
PHP 5.0.6-dev (cli) (built: Nov 16 2005 12:01:44)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies

It produced: =?ISO-8859-2?Q?Mi=C5=9Bkiewicz?= which is wrong. 

The same test using:
[root@gucio ~]# php4 --version
PHP 4.4.2-dev (cli) (built: Nov 15 2005 09:55:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with eAccelerator v0.9.3, Copyright (c) 2004-2004 eAccelerator, by eAccelerator
[root@gucio ~]# php4 a.php

gives correct result: =?ISO-8859-2?Q?Mi=B6kiewicz?=

Reproduce code:
Test code is:

$user_name = "Mi&#347;kiewicz"; // iso8859-2 text
echo mb_encode_mimeheader($user_name, "ISO-8859-2", "Q") . "\n";

mutt users can later verify correctness of result by simply putting it into mail like:
[arekm@iarm ~]$ cat a.txt
From me Thu Sep 29 09:32:30 2005
From: someone <>
Subject: =?ISO-8859-2?Q?Mi=C5=9Bkiewicz?=
MIME-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


and doing mutt -R -f a.txt

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-16 11:17 UTC] misiek at dione dot ids dot pl
"Mi&#347;kiewicz"; - of course here should be letter <s'>  /xB6  <U015B>  LATIN SMALL LETTER S WITH ACUTE ( instead of &#347;
 [2005-11-16 12:04 UTC] misiek at dione dot ids dot pl
Seems to be fixed by #33720 and my test had one bug.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 00:01:28 2024 UTC