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  


 [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