Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35236 : mb_encode_mimeheader() doesn't properly encode to QP
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 9th June 11:30
php-bugs@lists.php.net (misiek at dione dot ids dot
External User
 
Posts: 1
Default #35236 : mb_encode_mimeheader() doesn't properly encode to QP



From: misiek at dione dot ids dot pl
Operating system: Linux
PHP version: 5.0.5
PHP Bug Type: mbstring related
Bug description: mb_encode_mimeheader() doesn't properly encode to QP

Description:
------------
I'm testing with php5-STABLE-200511160740.

[arekm@pepe php5-STABLE-200511160740]$ ./sapi/cli/php ~/a.php
=?ISO-8859-2?Q?Mi=C5=9Bkiewicz?=
[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
=?ISO-8859-2?Q?Mi=B6kiewicz?=

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

Reproduce code:
---------------
Test code is:

<?php
$user_name = "Miśkiewicz"; // iso8859-2 text
mb_internal_encoding("ISO-8859-2");
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 <x@y.pl>
To: a@b.pl
Subject: =?ISO-8859-2?Q?Mi=C5=9Bkiewicz?=
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

test

and doing mutt -R -f a.txt


Expected result:
----------------
=?ISO-8859-2?Q?Mi=B6kiewicz?=

Actual result:
--------------
=?ISO-8859-2?Q?Mi=C5=9Bkiewicz?=

--
Edit bug report at http://bugs.php.net/?id=35236&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35236&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35236&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35236&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35236&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35236&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35236&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35236&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35236&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35236&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35236&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35236&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35236&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35236&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35236&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35236&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35236&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35236&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35236&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35236&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35236&r=mysqlcfg
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666