From: nospam at nihonbunka dot com Operating system: BSD PHP version: 5.2.6 PHP Bug Type: *Unicode Issues Bug description: iconv removes tidles when converting from utf to shift_jis
Description: ------------ inconv does not seem to convert single space tildes from utf8 to shift_jis Please bear in mind that shift_jis tildes are not where one would expect them to be. http://en.wikipedia.org/wiki/Shift-JIS "The single-byte characters 0x00 to 0x7F match the ASCII encoding, except for a yen sign at 0x5C and an overline at 0x7E in place of the ASCII character set's backslash and tilde respectively." If I use //IGNORE then the tildes just disappear. If I use //TRANSLIT the bug is even worse - all of the string after and including the first the ~ disappears. There was also a double byte tilde problem in the past, but this is different. Reproduce code: --------------- <?PHP $conv_str = iconv('utf-8','shift-jis'.'//IGNORE','where are the (~) (~) tildes?'); echo ($conv_str); ?> Expected result: ---------------- where are the (~) (~) tildes? the above in shift_jist using //IGNORE Actual result: -------------- where are the () () tildes? using //IGNORE and where are the ( using //TRANSLIT -- Edit bug report at http://bugs.php.net/?id=45017&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45017&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45017&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45017&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45017&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45017&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45017&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45017&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45017&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45017&r=support Expected behavior: http://bugs.php.net/fix.php?id=45017&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45017&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45017&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45017&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45017&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45017&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45017&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45017&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45017&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45017&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45017&r=mysqlcfg