From:             euromark at web dot de
Operating system: any
PHP version:      Irrelevant
Package:          mbstring related
Bug Type:         Bug
Bug description:wordwrap unicode issues

Description:
------------
wordwrap() is not able (by design) to properly work with unicode. 
Even with the latest PHP versions, though, there is no proper unicode
support for wordwrap(), e.g. via MB functionality.

We ended up to "write" our own function to fix this bug, but it would be
nice if a future version would provide this natively.
See the code linked below for concrete details.

Test script:
---------------
See the following PR code for

a) test cases to proof the defencency
b) a (PHP) fix to overcome it

https://github.com/cakephp/cakephp/pull/1695/files#diff-c3726f6e24d3c82640dc380aa9a0be17R352

Expected result:
----------------
I would expect to either have wordwrap() properly work with Unicode
input (A pretty common scenario these days) or to have mb_wordwrap()
available to handle this.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65833&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65833&r=trysnapshot54
Try a snapshot (PHP 5.5):   
https://bugs.php.net/fix.php?id=65833&r=trysnapshot55
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65833&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65833&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65833&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65833&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65833&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65833&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65833&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65833&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65833&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65833&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65833&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65833&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65833&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65833&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65833&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65833&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65833&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65833&r=mysqlcfg

Reply via email to