[PHP-DOC] #21592 [Opn]: form submit and iso-8859-2
ID: 21592 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open -Bug Type: Scripting Engine problem +Bug Type: Documentation problem Operating System: RH 8.0 PHP Version: 4.3.0 New Comment: By default, htmlspecialchars() treats the input character set as iso-8859-1. If you want to specify it, you need to pass the appropriate charset name to the function via the third parameter. For more info, see http://www.php.net/htmlspecialchars. And moreover, htmlspecialchars() doesn't support iso-8859-2. Here's the list of supported charsets: ISO-8859-1 (alias: ISO8859-1) ISO-8859-15 (alias: ISO8859-15) UTF-8 cp1252 (alias: Windows-1252, 1252) BIG5 (alias: 950) GB2312 (alias: 936) BIG5-HKSCS Shift_JIS (alias: SJIS, 932) EUCJP (alias: EUC-JP) I think this list should have been put on the manual in the first place. Let me marking this problem report as Documentation Problem. Thanks for your report. Previous Comments: [2003-01-13 02:49:06] [EMAIL PROTECTED] Then some more info: Here is an example: http://www.parbanszep.hu/aa.php And the file: html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-2 /head body h1?=htmlspecialchars($xx);?/h1 form method=post input type=text name=xx value=?=$xx? textarea name=yy?=htmlspecialchars($yy);?/textarea input type=submit /form /body /html Now try to enter õûÕÛ into the two fields, they will become #245; etc. instead of their one-char-form. Further info: http://www.parbanszep.hu/phpinfo.php [2003-01-12 12:46:00] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Please provide an example which reproduces this error, also include any relevant httpd.conf/php.ini settings. [2003-01-12 02:52:51] [EMAIL PROTECTED] When I submit a form (GET or POST), characters only in the iso-8859-2 charset (like õûÕÛ) are not converted from quoted-printable to their 1-character-long representations, instead they left unchanged like #245; etc. I set the charset in the httpd.conf file, in the php.ini file, in the header of the html file and in the accept-charset attrib. of the form tag, but with no avail. I tried it in NN, Opera and IE. One more thing: sometimes it works correctly, but most of the time it doesn't. So strange enough! -- Edit this bug report at http://bugs.php.net/?id=21592edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #21592 [Opn]: form submit and iso-8859-2
ID: 21592 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: RH 8.0 PHP Version: 4.3.0 New Comment: s/let me marking/let me mark/ Previous Comments: [2003-01-18 08:55:32] [EMAIL PROTECTED] By default, htmlspecialchars() treats the input character set as iso-8859-1. If you want to specify it, you need to pass the appropriate charset name to the function via the third parameter. For more info, see http://www.php.net/htmlspecialchars. And moreover, htmlspecialchars() doesn't support iso-8859-2. Here's the list of supported charsets: ISO-8859-1 (alias: ISO8859-1) ISO-8859-15 (alias: ISO8859-15) UTF-8 cp1252 (alias: Windows-1252, 1252) BIG5 (alias: 950) GB2312 (alias: 936) BIG5-HKSCS Shift_JIS (alias: SJIS, 932) EUCJP (alias: EUC-JP) I think this list should have been put on the manual in the first place. Let me marking this problem report as Documentation Problem. Thanks for your report. [2003-01-13 02:49:06] [EMAIL PROTECTED] Then some more info: Here is an example: http://www.parbanszep.hu/aa.php And the file: html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-2 /head body h1?=htmlspecialchars($xx);?/h1 form method=post input type=text name=xx value=?=$xx? textarea name=yy?=htmlspecialchars($yy);?/textarea input type=submit /form /body /html Now try to enter õûÕÛ into the two fields, they will become #245; etc. instead of their one-char-form. Further info: http://www.parbanszep.hu/phpinfo.php [2003-01-12 12:46:00] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Please provide an example which reproduces this error, also include any relevant httpd.conf/php.ini settings. [2003-01-12 02:52:51] [EMAIL PROTECTED] When I submit a form (GET or POST), characters only in the iso-8859-2 charset (like õûÕÛ) are not converted from quoted-printable to their 1-character-long representations, instead they left unchanged like #245; etc. I set the charset in the httpd.conf file, in the php.ini file, in the header of the html file and in the accept-charset attrib. of the form tag, but with no avail. I tried it in NN, Opera and IE. One more thing: sometimes it works correctly, but most of the time it doesn't. So strange enough! -- Edit this bug report at http://bugs.php.net/?id=21592edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #21592 [Opn]: form submit and iso-8859-2
ID: 21592 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: RH 8.0 PHP Version: 4.3.0 New Comment: Related: bug #7923 Previous Comments: [2003-01-18 09:11:30] [EMAIL PROTECTED] s/let me marking/let me mark/ [2003-01-18 08:55:32] [EMAIL PROTECTED] By default, htmlspecialchars() treats the input character set as iso-8859-1. If you want to specify it, you need to pass the appropriate charset name to the function via the third parameter. For more info, see http://www.php.net/htmlspecialchars. And moreover, htmlspecialchars() doesn't support iso-8859-2. Here's the list of supported charsets: ISO-8859-1 (alias: ISO8859-1) ISO-8859-15 (alias: ISO8859-15) UTF-8 cp1252 (alias: Windows-1252, 1252) BIG5 (alias: 950) GB2312 (alias: 936) BIG5-HKSCS Shift_JIS (alias: SJIS, 932) EUCJP (alias: EUC-JP) I think this list should have been put on the manual in the first place. Let me marking this problem report as Documentation Problem. Thanks for your report. [2003-01-13 02:49:06] [EMAIL PROTECTED] Then some more info: Here is an example: http://www.parbanszep.hu/aa.php And the file: html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-2 /head body h1?=htmlspecialchars($xx);?/h1 form method=post input type=text name=xx value=?=$xx? textarea name=yy?=htmlspecialchars($yy);?/textarea input type=submit /form /body /html Now try to enter õûÕÛ into the two fields, they will become #245; etc. instead of their one-char-form. Further info: http://www.parbanszep.hu/phpinfo.php [2003-01-12 12:46:00] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Please provide an example which reproduces this error, also include any relevant httpd.conf/php.ini settings. [2003-01-12 02:52:51] [EMAIL PROTECTED] When I submit a form (GET or POST), characters only in the iso-8859-2 charset (like õûÕÛ) are not converted from quoted-printable to their 1-character-long representations, instead they left unchanged like #245; etc. I set the charset in the httpd.conf file, in the php.ini file, in the header of the html file and in the accept-charset attrib. of the form tag, but with no avail. I tried it in NN, Opera and IE. One more thing: sometimes it works correctly, but most of the time it doesn't. So strange enough! -- Edit this bug report at http://bugs.php.net/?id=21592edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php