php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65488 Bad character encoding detection when form is set enctype="multipart/form-data"
Submitted: 2013-08-20 14:01 UTC Modified: 2013-10-15 11:54 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: tomas dot glabasna at seznam dot cz Assigned:
Status: No Feedback Package: mbstring related
PHP Version: 5.4.18 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 18 = ?
Subscribe to this entry?

 
 [2013-08-20 14:01 UTC] 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"); // ěščřžýáíé
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-20 14:10 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2013-08-20 14:10 UTC] ab@php.net
Looks similar to bug #63094, could you pls check yohgaki's comment there?
 [2013-09-01 09:34 UTC] tomas dot glabasna at seznam dot cz
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).
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
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 "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC