php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33720 mb_encode_mimeheader does not work
Submitted: 2005-07-16 05:14 UTC Modified: 2005-11-08 14:55 UTC
Votes:7
Avg. Score:4.1 ± 0.8
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:0 (0.0%)
From: s dot masugata at digicom dot dnp dot co dot jp Assigned: hirokawa (profile)
Status: Closed Package: mbstring related
PHP Version: 4.4.0 OS: Solaris8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: s dot masugata at digicom dot dnp dot co dot jp
New email:
PHP Version: OS:

 

 [2005-07-16 05:14 UTC] s dot masugata at digicom dot dnp dot co dot jp
Description:
------------
http://bugs.php.net/bug.php?id=32311
mb_encode_mimeheader is did not operate by the influence that corrected this problem. 


Reproduce code:
---------------
<?
declare( encoding="EUC-JP" );
var_dump( mb_encode_mimeheader( "?\??" ) );
?>


Expected result:
----------------
string(34) "=?ISO-2022-JP?B?GyRCST1CahsoQg==?="

Actual result:
--------------
string(2) "hL"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-18 02:22 UTC] sniper@php.net
Moriyoshi: Somehow it looks like you never fixed #321311 anywhere, just added a NEWS entry ???


 [2005-08-17 10:13 UTC] misiek at dione dot ids dot pl
This function doesn't work for me in different situation, too:

<?php
$str = "costam U&#380;ytkownik co&#347;tam inne";
$charset = "iso-8859-2";
mb_internal_encoding($charset);
$str = mb_encode_mimeheader($str,$charset,'Q');
echo "$str\n";
?>

should produce:
costam =?ISO-8859-2?Q?U=BFytkownik=20co=B6tam=20inne?=
(and this works on php 5.0.4)

but on 4.4.0 it produces:
costam U|ytkownik co[tam inne
 [2005-08-17 10:18 UTC] misiek at dione dot ids dot pl
Argh, these characters in $str are s' and l/ in iso8859-2 and should be written in 8-bit not as html entities.
 [2005-11-08 14:55 UTC] hirokawa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC