From: kulakov74 at yandex dot ru Operating system: Linux PHP version: 5.2.9 PHP Bug Type: ICONV related Bug description: iconv with //IGNORE cuts the string
Description: ------------ iconv() without //IGNORE as known cuts the string at the first illegal character, but with //IGNORE it should not. Still, I get a truncated text, but not at the point where the character is. Sorry the actual PHP version is 5.2.6, but I cannot upgrade it. Just to let you know. Can you test that with the last version? Please download the file from http://www.oppcharts.com/iconv.html Reproduce code: --------------- $Body1=... //read the file echo(strlen($Body1)."\n"); $Body2=iconv('UTF-8', 'ISO-8859-1', $Body1); echo(strlen($Body2)."\n"); $Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1); echo(strlen($Body2)."\n"); Expected result: ---------------- 15323 Notice: iconv(): Detected an illegal character in input string in /home/doldon/html/tdnam/dev.php on line 18 3588 ----------------------------------- 15323 15321 - I can get this if I use //TRANSLIT or when I run the test on my home Windows PHP 4 Actual result: -------------- 15323 Notice: iconv(): Detected an illegal character in input string in /home/doldon/html/tdnam/dev.php on line 18 3588 ----------------------------------- 15323 Notice: iconv(): Detected an illegal character in input string in /home/doldon/html/tdnam/dev.php on line 18 8157 - THIS IS THE PROBLEM -- Edit bug report at http://bugs.php.net/?id=48147&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48147&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48147&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48147&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48147&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48147&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48147&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48147&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48147&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48147&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48147&r=support Expected behavior: http://bugs.php.net/fix.php?id=48147&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48147&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48147&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48147&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48147&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48147&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48147&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48147&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48147&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48147&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48147&r=mysqlcfg
