#29760 [Bgs]: not correct works function, separators are placed accidentally
| From: | sych at php dot com dot ua | Date: | Fri, 20 Aug 2004 08:01:53 +0000 |
| Subject: | #29760 [Bgs]: not correct works function, separators are placed accidentally | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64993@lists.php.net to get a copy of this message | ||
ID: 29760
User updated by: sych at php dot com dot ua
Reported By: sych at php dot com dot ua
Status: Bogus
Bug Type: Strings related
Operating System: win2000
PHP Version: 5.0.0
New Comment:
Yesterday I mistaken with examples there was heavy workday ,but
function wordwrap works not correct with UTF-8 encoding.
Previous Comments:
------------------------------------------------------------------------
[2004-08-19 16:42:17] derick@php.net
Ah, there was already a script.
The wordwrap function seperates on characters (second parameter), not
words.
Please read the documentation at http://php.net/wordwrap
------------------------------------------------------------------------
[2004-08-19 16:35:16] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2004-08-19 16:30:55] sych at php dot com dot ua
Code1:
$text = wordwrap($string, 2, "#");
Result1:
word1#word2#word3#word4#word5#word6#word7#word8"
Expected result1:
word1 word2# word3 word4# word5 word6# word7 word8
Code2:
$text = wordwrap($string, 3, "#");
Result2:
word1#word2#word3#word4#word5#word6#word7#word8"
Expected result2:
word1 word2 word3# word4 word5 word6# word7 word8
------------------------------------------------------------------------
[2004-08-19 16:22:56] tony2001@php.net
Err.. Forget it, clicked on a wrong link.
Please, provide more information, your example is not readable.
------------------------------------------------------------------------
[2004-08-19 16:21:00] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29760
--
Edit this bug report at http://bugs.php.net/?id=29760&edit=1