Edit report at http://bugs.php.net/bug.php?id=52836&edit=1
ID: 52836 Updated by: ahar...@php.net Reported by: danny at studyportals dot eu Summary: iconv //TRANSLIT property not functioning as it should -Status: Feedback +Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: Windows 7 PHP Version: 5.3.3 Block user comment: N New Comment: Not developer issue -> closing. Previous Comments: ------------------------------------------------------------------------ [2010-09-14 11:25:48] danny at studyportals dot eu This seemed to have solved the test I have set up, but for us, the issue persists. I will investigate this issue further and try to find out why it is not working for me. Thank you for your quick responce ------------------------------------------------------------------------ [2010-09-14 10:48:26] ahar...@php.net Are you sure your PHP script is saved as UTF-8? This works as expected for me when it is, but fails similarly to your example when the PHP script is in a single-byte encoding where ⬠is an invalid UTF-8 string, such as ISO-8859-15. ------------------------------------------------------------------------ [2010-09-14 10:41:01] danny at studyportals dot eu 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 this bug report at http://bugs.php.net/bug.php?id=52836&edit=1