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

Bug #11708 getWeekdayAbbrname returns wrong lenght if string is unicode
Submitted: 2007-07-30 09:58 UTC
From: dzikus Assigned: c01234
Status: Closed Package: Date (version 1.4.7)
PHP Version: 5.2.3 OS: Linux
Roadmaps: (Not assigned)    
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 : 29 + 5 = ?

 
 [2007-07-30 09:58 UTC] dzikus (Grzegorz Sterniczuk)
Description: ------------ If locale is set to UTF-8 and getWeekdayAbbrname will return string with national utf characters, lenght isn't recalucated so string is cuted to shortly. For example getWeekdayAbbrname(27,07,2007, 3); in pl_PL.UTF-8 locale should return "pią", but now function return "pi�" becouse last byte from two bytes char "ą" is cuted away. Test script: --------------- setlocale(LC_TIME, 'pl_PL.UTF-8'); print getWeekdayAbbrname(27,07,2007, 3); Expected result: ---------------- pią Actual result: -------------- pi�

Comments

 [2008-03-23 23:09 UTC] c01234 (Chuckie Chuck)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Date