Bug #52836 [NEW]: iconv //TRANSLIT property not functioning as it should
| From: | danny at studyportals dot eu | Date: | Tue, 14 Sep 2010 08:41:05 +0000 |
| Subject: | Bug #52836 [NEW]: iconv //TRANSLIT property not functioning as it should | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-154325@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows 7
PHP version: 5.3.3
Package: Unknown/Other Function
Bug Type: Bug
Bug description:iconv //TRANSLIT property not functioning as it should
Description:
------------
This bug was discovered in libiconv 1.11
The //TRANSLIT property seems to be discarded. While passing this property
and
encountering characters as ⬠it handles as if you used the plain variant
on it.
See test case below, this is the example given in the PHP docs
(http://php.net/manual/en/function.iconv.php)
Test script:
---------------
<?php
$text = "This is the Euro symbol 'â¬'.";
echo 'Original : ', $text, PHP_EOL;
echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text),
PHP_EOL;
echo 'IGNORE : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text),
PHP_EOL;
echo 'Plain : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;
?>
Expected result:
----------------
Original : This is the Euro symbol 'â¬'.
TRANSLIT : This is the Euro symbol 'EUR'.
IGNORE : This is the Euro symbol ''.
Plain :
Notice: iconv(): Detected an illegal character in input string in .\iconv-
example.php on line 7
This is the Euro symbol '
(Example on http://php.net/manual/en/function.iconv.php)
Actual result:
--------------
Original : This is the Euro symbol 'â¬'.
TRANSLIT : Notice: iconv(): Detected an illegal character in input string
in
D:\Web\Webroot\test.php on line 6
This is the Euro symbol '
IGNORE : This is the Euro symbol ''.
Plain : Notice: iconv(): Detected an illegal character in input string in
D:\Web\Webroot\test.php on line 8
This is the Euro symbol '
--
Edit bug report at http://bugs.php.net/bug.php?id=52836&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52836&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52836&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52836&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52836&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52836&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52836&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52836&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52836&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52836&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52836&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52836&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52836&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52836&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52836&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52836&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52836&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52836&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52836&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52836&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52836&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52836&r=mysqlcfg