Edit report at https://bugs.php.net/bug.php?id=65488&edit=1
ID: 65488
Comment by: tomas dot glabasna at seznam dot cz
Reported by: tomas dot glabasna at seznam dot cz
Summary: Bad character encoding detection when form is set
enctype="multipart/form-data"
Status: Feedback
Type: Bug
Package: mbstring related
Operating System: Linux
PHP Version: 5.4.18
Block user comment: N
Private report: N
New Comment:
I wrote a comment to the Bug #63094 (It's the same problem.)
The problem was not in older versions of PHP (5.3 and 5.2).
Previous Comments:
------------------------------------------------------------------------
[2013-08-20 14:10:52] [email protected]
Looks similar to bug #63094, could you pls check yohgaki's comment there?
------------------------------------------------------------------------
[2013-08-20 14:01:00] tomas dot glabasna at seznam dot cz
Description:
------------
Bad character encoding detection when form is set enctype="multipart/form-data"
and mbstring.encoding_translation is On
Version PHP 5.2.14 and PHP 5.3.3 is OK
My php.ini:
.....
mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.encoding_translation = On
mbstring.http_input = auto
mbstring.http_output = UTF-8
.....
may be associated with https://bugs.php.net/bug.php?id=44624
Test script:
---------------
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<form enctype="multipart/form-data" method="post">
<input name="message" value="ÄÅ¡ÄÅžýáÃé">
<input type="submit">
</form>
...
<?php
echo $_POST['message']; // ÃÂÃ
¡ÃÂÃ
ÂÃ
¾Ã½Ã¡ÃÂé
echo mb_detect_encoding($_POST['message']); // UTF-8
echo mb_http_input("P"); //false
echo $str = mb_convert_encoding($_POST['message'], "ISO-8859-1", "UTF-8"); //
ÄÅ¡ÄÅžýáÃé
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65488&edit=1