From: david at davidheath dot org Operating system: linux PHP version: 4.3.9 PHP Bug Type: mbstring related Bug description: incorrect character translations for some ISO-8859 charsets
Description: ------------ MBstring appears to incorrectly map some characters for the following ISO-8859 charsets, as follows: Encoding: ISO-8859-7 incorrect mapping of char 0xa4: got 0x3f, expected 0x20ac incorrect mapping of char 0xa5: got 0x3f, expected 0x20af incorrect mapping of char 0xaa: got 0x3f, expected 0x37a Encoding: ISO-8859-8 incorrect mapping of char 0xaf: got 0x203e, expected 0xaf incorrect mapping of char 0xfd: got 0x3f, expected 0x200e incorrect mapping of char 0xfe: got 0x3f, expected 0x200f Encoding: ISO-8859-10 incorrect mapping of char 0xa4: got 0x124, expected 0x12a This is based on the mappings provided at ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/ on 25th Oct 2004. Note, there are undated comments in the "Version history" for the above files, as follows: 8859-7: # 2.0 version updates 1.0 version by adding mappings for the # three newly added characters 0xA4, 0xA5, 0xAA. 8859-8: # 1.1 version updates to the published 8859-8:1999, correcting # the mapping of 0xAF and adding mappings for LRM and RLM. 8859-10: # 1.1 corrected mistake in mapping of 0xA4 So I guess these mappings have changed since mbstring was first written. I'm not sure if there would be a backward-compatability problem if the mappings were changed. Thanks Dave Reproduce code: --------------- Code for this test is available at: http://davidheath.org/mbstring/mbstring_test.tar.bz2 Expected result: ---------------- Mappings as stated "expected xxx" above. Actual result: -------------- Mappings as stated "got xxx" above. -- Edit bug report at http://bugs.php.net/?id=30549&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30549&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30549&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30549&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30549&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30549&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30549&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30549&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30549&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30549&r=support Expected behavior: http://bugs.php.net/fix.php?id=30549&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30549&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30549&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30549&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30549&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30549&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30549&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30549&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30549&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30549&r=mysqlcfg