#49575 [Opn->Fbk]: iconv function fails if you try to convert one character set into the same set
| From: | jani@php.net | Date: | Thu, 17 Sep 2009 15:34:54 +0000 |
| Subject: | #49575 [Opn->Fbk]: iconv function fails if you try to convert one character set into the same set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142472@lists.php.net to get a copy of this message | ||
ID: 49575
Updated by: jani@php.net
Reported By: me at mikearsenault dot com
-Status: Open
+Status: Feedback
Bug Type: ICONV related
Operating System: Linux
PHP Version: 5.2SVN-2009-09-17 (SVN)
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
works fine for me.
Previous Comments:
------------------------------------------------------------------------
[2009-09-17 01:14:52] me at mikearsenault dot com
Description:
------------
If you try to convert one character set into the same character set
using this function, it causes a 500 internal server error that shows up
in the logs as:
[error] [client XXX.XXX.XXX.XXX] Premature end of script headers:
myscript.php
Reproduce code:
---------------
$charset = "ISO-8859-1";
try {
$i= iconv($charset, "ISO-8859-1",
"123321ksdjvskjdfksdfbasbdaSDjhdb");
echo $i;
}
catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
Expected result:
----------------
123321ksdjvskjdfksdfbasbdaSDjhdb
Actual result:
--------------
500 Internal Server Error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49575&edit=1