Bug #76679 [NEW]: mb_http_input does not default to default_charset
| From: | ASchmidt at Anamera dot net | Date: | Sun, 29 Jul 2018 22:51:32 +0000 |
| Subject: | Bug #76679 [NEW]: mb_http_input does not default to default_charset | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-216519@lists.php.net to get a copy of this message | ||
From: ASchmidt at Anamera dot net
Operating system: Win x64
PHP version: 7.2.8
Package: mbstring related
Bug Type: Bug
Bug description:mb_http_input does not default to default_charset
Description:
------------
According to documentation on "default-charset" (
http://php.net/manual/en/ini.core.php#ini.default-charset):
"The value of default_charset will also be used to set the default
character set for ... mbstring functions if the mbstring.http_input
mbstring.http_output mbstring.internal_encoding configuration option is
unset."
This is true EXCEPT for mbstring.http_input! Querying all other settings
will properly return "UTF-8" from the default-charset, but querying
mbstring.http_input will return FALSE!
Test script:
---------------
<?php
declare(strict_types=1);
var_dump( ini_get( 'default_charset' ) ); // UTF-8
var_dump( mb_internal_encoding() ); // UTF-8
var_dump( mb_http_output() ); // UTF-8
var_dump( mb_http_input() ); // FALSE
var_dump( mb_regex_encoding() ); // UTF-8
Expected result:
----------------
mb_http_input() should return the explicitly set default_charset (e.g.,
UTF-8).
Actual result:
--------------
mb_http_input() returns FALSE, even if default_charset is set to UTF-8.
--
Edit bug report at https://bugs.php.net/bug.php?id=76679&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76679&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76679&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76679&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76679&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76679&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76679&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76679&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76679&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76679&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76679&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76679&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76679&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76679&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76679&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76679&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76679&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76679&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76679&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76679&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76679&r=mysqlcfg