#29908 [Fbk->NoF]: explode() corrupts utf8 data
| From: | sniper@php.net | Date: | Sun, 20 Mar 2005 17:04:08 +0000 |
| Subject: | #29908 [Fbk->NoF]: explode() corrupts utf8 data | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75581@lists.php.net to get a copy of this message | ||
ID: 29908
Updated by: sniper@php.net
Reported By: sven dot burmeister at gmx dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Strings related
Operating System: linux
PHP Version: 5.0.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 20:56:54] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-08-31 10:53:30] sven dot burmeister at gmx dot net
Description:
------------
utf8 encoded page, send <input type=text name=foo, if you input
ferienhäuser and use array = explode(" ",$_REQUEST["foo"]) on that
variable you get an array with echo $array[0] displayed in the browser
source as ferienhãuser instead of ferienhÃuser.
echo $_REQUEST["foo"]; displays correctly
Same happens if string submitted is "ferienhäuser region" so it is not
due to the lack of a space in the string.
using php5 compiled with latest apache and mysql-support on suse linux
9.0.
Reproduce code:
---------------
<input type=text name=foo value=''>
if($_REQUEST["foo"] != ""){$array = explode(" ",$foo)}
Expected result:
----------------
in_array("ferienhäuser",$array) == true;
Actual result:
--------------
As described above in_array does not find the keyword and all browsers
do not display $array[0] correctly, although they do for
$_REQUEST["foo"]
Reason, string gets corrupted.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29908&edit=1