From: mauroi at digbang dot com Operating system: * PHP version: 5.1.2 PHP Bug Type: Feature/Change Request Bug description: Problem with unicode escape sequences in binary data
Description: ------------ This is not a bug itself, but it's a problem that I run into often because I develop unicode applications with mbstring overloading functions. Whenever I try to know the length of binary information (for example, a lob retrieved from the database, in order to set the content-length header) I get errors because raw bytes inside the variable are interpreted as unicode escape sequences. So the length returned by strlen is less than the correct one. See Bug #35412 for a similar situation (there might be more). In that cases I use mb_strlen($str, 'ASCII') but it would be nice to have a function called bytecount or something like that. Maybe there are already plans for this in PHP6 with the new unicode thing. -- Edit bug report at http://bugs.php.net/?id=36024&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36024&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36024&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36024&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36024&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36024&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36024&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36024&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36024&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36024&r=support Expected behavior: http://bugs.php.net/fix.php?id=36024&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36024&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36024&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36024&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36024&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36024&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36024&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36024&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36024&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36024&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36024&r=mysqlcfg