php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43799 ICONV iconv_mime_encode Unknown error (7)
Submitted: 2008-01-09 14:40 UTC Modified: 2008-01-28 23:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cstockton at godaddy dot com Assigned:
Status: Not a bug Package: ICONV related
PHP Version: 5.2.5 OS: Ubuntu Server
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: cstockton at godaddy dot com
New email:
PHP Version: OS:

 

 [2008-01-09 14:40 UTC] cstockton at godaddy dot com
Description:
------------
Iconv fails to properly encode a TELUGU String, among several others. The example is TELGU, but I believe fixing TELGU will fix all other languages. The string is identical in all 3 cases, but I simply add a whitespace character on the last 2 examples, in which the third case fails. This bug is similar to Bug #43314, but maybe this one has a more helpfull test case, as Bug #43314 has not been answered.

Reproduce code:
---------------
$str = "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦"; // success
echo var_dump($str), "\n",
var_dump(iconv_mime_encode('from', $str, $preferences)), "\n";

$str = "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦ "; // success
echo var_dump($str), "\n",
var_dump(iconv_mime_encode('from', $str, $preferences)), "\n";

$str = "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦  "; // failure
echo var_dump($str), "\n",
var_dump(iconv_mime_encode('from', $str, $preferences)), "\n";

Expected result:
----------------
string(48) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦"

string(192) "from: =?UTF-8?Q?=E0=B0=BF=E0=B0=A2=E0=B1=A7=E0=B0=AC=E0=B0=9F?=
 =?UTF-8?Q?=E0=B0=9C=E0=B0=A5=E0=B0=AF=E0=B0=8F=E0=B0=AD=E0=B1=AF?=
 =?UTF-8?Q?=E0=B0=88=E0=B0=8C=E0=B0=81=E0=B0=9A=E0=B1=A6?="

string(49) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦ "

string(195) "from: =?UTF-8?Q?=E0=B0=BF=E0=B0=A2=E0=B1=A7=E0=B0=AC=E0=B0=9F?=
 =?UTF-8?Q?=E0=B0=9C=E0=B0=A5=E0=B0=AF=E0=B0=8F=E0=B0=AD=E0=B1=AF?=
 =?UTF-8?Q?=E0=B0=88=E0=B0=8C=E0=B0=81=E0=B0=9A=E0=B1=A6=20?="

string(50) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦  "

string(195) "from: =?UTF-8?Q?=E0=B0=BF=E0=B0=A2=E0=B1=A7=E0=B0=AC=E0=B0=9F?=
 =?UTF-8?Q?=E0=B0=9C=E0=B0=A5=E0=B0=AF=E0=B0=8F=E0=B0=AD=E0=B1=AF?=
 =?UTF-8?Q?=E0=B0=88=E0=B0=8C=E0=B0=81=E0=B0=9A=E0=B1=A6=20=20?="

Actual result:
--------------
string(48) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦"

string(192) "from: =?UTF-8?Q?=E0=B0=BF=E0=B0=A2=E0=B1=A7=E0=B0=AC=E0=B0=9F?=
 =?UTF-8?Q?=E0=B0=9C=E0=B0=A5=E0=B0=AF=E0=B0=8F=E0=B0=AD=E0=B1=AF?=
 =?UTF-8?Q?=E0=B0=88=E0=B0=8C=E0=B0=81=E0=B0=9A=E0=B1=A6?="

string(49) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦ "

string(195) "from: =?UTF-8?Q?=E0=B0=BF=E0=B0=A2=E0=B1=A7=E0=B0=AC=E0=B0=9F?=
 =?UTF-8?Q?=E0=B0=9C=E0=B0=A5=E0=B0=AF=E0=B0=8F=E0=B0=AD=E0=B1=AF?=
 =?UTF-8?Q?=E0=B0=88=E0=B0=8C=E0=B0=81=E0=B0=9A=E0=B1=A6=20?="

string(50) "ిఢ౧బటజథయఏభ౯ఈఌఁచ౦  "



Notice:  iconv_mime_encode() [function.iconv-mime-encode]: Unknown error (7) in /media/storagegb/htdocs/rapidQA/modules/test02.php on line 81

bool(false)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-28 23:43 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

We can't fix libc's iconv() function.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC