Doc->Bug #68842 [Csd->ReO]: mb_check_encoding() behavior does not check all HTTP inputs
| From: | yohgaki@php.net | Date: | Sat, 19 Dec 2015 23:23:08 +0000 |
| Subject: | Doc->Bug #68842 [Csd->ReO]: mb_check_encoding() behavior does not check all HTTP inputs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198046@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68842&edit=1
ID: 68842
Updated by: yohgaki@php.net
Reported by: yohgaki@php.net
-Summary: mb_check_encoding() behavior does not match document
+Summary: mb_check_encoding() behavior does not check all HTTP
inputs
-Status: Closed
+Status: Re-Opened
-Type: Documentation Problem
+Type: Bug
Package: mbstring related
Operating System: Irerelevant
PHP Version: Irrelevant
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Rather than change old doc. It's better to change mb_check_encoding() behavior to documented
way.
Previous Comments:
------------------------------------------------------------------------
[2015-12-18 10:02:08] yohgaki@php.net
Automatic comment from SVN on behalf of yohgaki
Revision: http://svn.php.net/viewvc/?view=revision&revision=338292
Log: Fix bug #68842 mb_check_encoding() behavior does not match document
------------------------------------------------------------------------
[2015-01-16 02:36:41] yohgaki@php.net
Description:
------------
http://php.net/mb_check_encoding
says,
var
The byte stream to check. If it is omitted, this function checks all the input from the beginning of
the request.
This description is misleading. What mbstring does is
Return TRUE if all conversions since the execution of the script has no problems at all. Return
FALSE if there is any conversion errors in mbstring operations.
If input encoding conversion is done, all inputs (GPC) are converted from mbstring.http_input
encoding to mbstring.internal_encoding. If input encoding conversion is not done, it cannot be used
for input encoding checks.
I think it's better to check GET/POST/COOKIE encodings, but it was made this way since the
introduction, I guess. (I think 1st param was not optional at first, but I don't remember
well.)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68842&edit=1