ID: 24143
Updated by: [EMAIL PROTECTED]
Reported By: dradu at dudici dot dk
-Status: Open
+Status: Bogus
Bug Type: HTTP related
Operating System: Windows
PHP Version: 4.3.2
New Comment:
Euro-sign is only in ISO-8859-15, just change this:
<meta http-equiv='Content-Type' content='text/html;
charset=iso-8859-1'>
to this:
<meta http-equiv='Content-Type' content='text/html;
charset=iso-8859-15'>
And it will work. This has nothing to do with PHP,
seems like at least IE sends broken data when
the charset is wrong, you can test this yourself with this
perl script which prints the raw data:
post-test.cgi:
--------------8<----------------------
#!/usr/bin/perl
print "Content-type: text/html\n\n";
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
print "<pre>\n$buffer\n</pre>\n";
}
--------------8<----------------------
Previous Comments:
------------------------------------------------------------------------
[2003-06-12 04:18:22] dradu at dudici dot dk
Description:
------------
I have a form with some input fields (text & radios - see the attached
script).
When I enter the eurosign in one of the text fields and submit, the
first post variable is lost, i.e. does not appear in $_POST.
I can reproduce the error in the following conditions:
- The page's charset = ISO-8859-1 (maybe also with other ISO-8859)
- The form's method=POST & enctype=multipart/form-data
- Right before the submit button is a radio (or checkbox) input and I
DO NOT check the last radio option
- I type the eurosign character (I think code 80hex, Alt+0128) in a
text field
- Browser is IE
I used PHP binaries v.4.3.2 on Windows 2000 & XP/IIS with IE 6.0
No special changes in php.ini (except maybe upload_max_filesize=5M and
post_max_size=8M)
I have attached the script I used. Do you know what is happening? Why
this behaviour?
Maybe you have a solution ...
Thanks,
Radu Dudici
Reproduce code:
---------------
<html>
<head>
<title> i-Term </title>
<meta http-equiv='Content-Type' content='text/html;
charset=iso-8859-1'>
</head>
<body >
POST data:<br><pre>
<?
print_r ($_POST);
?>
</pre>
<form enctype="multipart/form-data" action="tst1.php" method="post" >
Test: <input type=text name='test' value="1">
<p>Comment:<p><textarea class="tbltxt" style='width: 320px' cols=50
name="comment" rows="1" ><[EMAIL PROTECTED]'comment']?></textarea>
<p>Radios:<br>
<input type=radio name="radios" value=1 > radio 1
<input type=radio name="radios" value=2 > radio 2
<p><input type=submit>
</form>
</body></html>
Expected result:
----------------
I expect to have all the post variables from the form into $_POST array
in PHP also when using eurosign character.
Actual result:
--------------
When entering the eurosign in a text field, and under the conditions
described above, the first post variable from the form is lost, i.e.
does not appear in $_POST array.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24143&edit=1