Bug #65488 [NEW]: Bad character encoding detection when form is set enctype="multipart/form-data"
| From: | tomas dot glabasna at seznam dot cz | Date: | Tue, 20 Aug 2013 14:01:00 +0000 |
| Subject: | Bug #65488 [NEW]: Bad character encoding detection when form is set enctype="multipart/form-data" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-181049@lists.php.net to get a copy of this message | ||
From: tomas dot glabasna at seznam dot cz
Operating system: Linux
PHP version: 5.4.18
Package: mbstring related
Bug Type: Bug
Bug description:Bad character encoding detection when form is set
enctype="multipart/form-data"
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 bug report at https://bugs.php.net/bug.php?id=65488&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65488&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65488&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65488&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65488&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65488&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65488&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65488&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65488&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65488&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65488&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65488&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65488&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65488&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65488&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65488&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65488&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65488&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65488&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65488&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65488&r=mysqlcfg