Doc #68842 [NEW]: mb_check_encoding() behavior does not match document
| From: | yohgaki@php.net | Date: | Fri, 16 Jan 2015 02:36:41 +0000 |
| Subject: | Doc #68842 [NEW]: mb_check_encoding() behavior does not match document | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11857@lists.php.net to get a copy of this message | ||
From: yohgaki
Operating system: Irerelevant
PHP version: Irrelevant
Package: mbstring related
Bug Type: Documentation Problem
Bug description:mb_check_encoding() behavior does not match document
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 bug report at https://bugs.php.net/bug.php?id=68842&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68842&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68842&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68842&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68842&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68842&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68842&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68842&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68842&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68842&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68842&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68842&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68842&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68842&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68842&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68842&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68842&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68842&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68842&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68842&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68842&r=mysqlcfg