Bug #13351: wordwrap ignores split character when counting input characters
| From: | jon at siliconcircus dot com | Date: | Mon, 17 Sep 2001 19:47:42 +0000 |
| Subject: | Bug #13351: wordwrap ignores split character when counting input characters | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66132@lists.php.net to get a copy of this message | ||
From: jon@siliconcircus.com
Operating system: Linux 2.2.19
PHP version: 4.0.6
PHP Bug Type: Strings related
Bug description: wordwrap ignores split character when counting input characters
When word-wrapping text, the wordwrap function fails to reset its character
count when encountering the break character in input text. As an example,
when supplied with the text
"foo bar\n<70 characters here> baz"
it will break before 'baz', instead of some time after 'baz' as it should
(assuming the standard 75 char line length and \n break char)
I've checked the source ( /ext/standard/string.c roughly around lines 395,
405, 442 and 456) and this is indeed the case. I can probably find time to
write and send a patch to the appropriate person if necessary, but this may
be more hassle to integrate than that person just doing the easy fix
themselves :-)
--
Edit bug report at: http://bugs.php.net/?id=13351&edit=1