Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #10605 Wrong Content-Length on Unicode configuration
Submitted: 2007-04-04 08:25 UTC
From: amaury Assigned: avb
Status: Closed Package: HTTP_Request (version 1.4.0)
PHP Version: 5.1.2 OS: Linux
Roadmaps: 1.4.1    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 34 = ?

 
 [2007-04-04 08:25 UTC] amaury (Amaury Bouchard)
Description: ------------ HTTP_Request uses strlen() to get the size of binary data. It works well on "1-byte per character" systems (ascii, latin1, ...). But when PHP is configured to use Unicode as its internal encoding (or any other multi-byte encoding), strlen() returns the number of characters and not the number of bytes. The solution is to replace each: strlen($var) by: mb_strlen($var, "ASCII")

Comments

 [2007-05-18 18:29 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.