Edit report at https://bugs.php.net/bug.php?id=68842&edit=1
ID: 68842
Updated by: [email protected]
Reported by: [email protected]
-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] [email protected]
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] [email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.