ID: 31609
Updated by: [EMAIL PROTECTED]
Reported By: jfo123 at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: RH 9.0
PHP Version: 4.3.4
New Comment:
1) your PHP version is too old.
2) works fine with latest CVS.
Previous Comments:
------------------------------------------------------------------------
[2005-01-22 07:53:17] jfo123 at hotmail dot com
Take away the last } nothing else.
Parsable code:
#--------------------
$title0 = "V�rlden �r �ngestfylld f�r katastrof";
$num_words = str_word_count($title0, 2);
foreach ($num_words AS $pos => $word) {
if ($pos < 50)
$title .= " $word";
}
print $title;
------------------------------------------------------------------------
[2005-01-19 12:42:44] [EMAIL PROTECTED]
Your code doesn't even parse, please provide a working script Put it in
a zip/tgz file on a website if possible, and provide a link.
------------------------------------------------------------------------
[2005-01-19 12:35:23] jfo123 at hotmail dot com
Description:
------------
str_word_count corrupts string with extended charset as in the swedish
character set. Special chars are deleted from the string.
Reproduce code:
---------------
$title0 = "V�rlden �r �ngestfylld f�r katastrof";
$num_words = str_word_count($title0, 2);
foreach ($num_words AS $pos => $word) {
if ($pos < 50)
$title .= " $word";
}
print $title;
}
Expected result:
----------------
V�rlden �r �ngestfylld f�r katastrof
Actual result:
--------------
Vrlden r ngestfylld fr katastrof
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31609&edit=1