From: victorepand at gmail dot com Operating system: Linux PHP version: 4.4.7 PHP Bug Type: *Languages/Translation Bug description: utf8_encode is missing characters
Description: ------------ I have used the function utf8_encode to encode iso-8859-1 pages into UTF-8 and displayed them on my site, but strange and funny characters are appearing such as "" and "Â". It turns out that the iso-8859-1 page contains the use of characters such as these: ©,,,,,®,, These characters display fine on my browser from the iso-8859-1 page, but when I use the utf8_encode function and display it on my utf-8 page, the result is garbled. So I have found the only solution is to manually convert all of the characters above before using the utf8_encode function and that solves the problem crudely, but it is not a perfect solution. What if I have missed any characters? Isn't there a cleaner method, a PHP function, that will do all this conversion without worry and without missing any characters? Reproduce code: --------------- Here is an example of an iso-8859-1 page which displays fine on my browser, but contains such characters such as ©,,,,,®,, mentioned above: http://www.jardenstore.com/product.aspx?bid=18&pid=1251 Expected result: ---------------- After using the utf8_encode function, I expected to see the page displaying correctly again on my UTF-8 page with these characters intact: ©,,,,,®,, Actual result: -------------- Instead, the result was garbled like this: â,â,â,â,Â,ââ¢,ââ¢,â,é,ð,â¢,,,è,Ž, -- Edit bug report at http://bugs.php.net/?id=41554&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41554&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41554&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41554&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41554&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41554&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41554&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41554&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41554&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41554&r=support Expected behavior: http://bugs.php.net/fix.php?id=41554&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41554&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41554&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41554&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41554&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41554&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41554&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41554&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41554&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41554&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41554&r=mysqlcfg