Bug #72992 [NEW]: mbstring.internal_encoding doesn't inherit default_charset

From: Date: Thu, 01 Sep 2016 12:00:53 +0000
Subject: Bug #72992 [NEW]: mbstring.internal_encoding doesn't inherit default_charset
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203724@lists.php.net to get a copy of this message
From:             zoeslam at gmail dot com
Operating system: Ubuntu 16.04
PHP version:      7.0.10
Package:          mbstring related
Bug Type:         Bug
Bug description:mbstring.internal_encoding doesn't inherit default_charset

Description:
------------
Likely related to https://bugs.php.net/bug.php?id=70035 but
internal_encoding is now deprecated

php -d default_charset='ISO-8859-1' -i | grep -E '(charset|encoding)'

default_charset => ISO-8859-1 => ISO-8859-1
input_encoding => no value => no value
internal_encoding => no value => no value
output_encoding => no value => no value
zend.script_encoding => no value => no value
iconv.input_encoding => no value => no value
iconv.internal_encoding => no value => no value
iconv.output_encoding => no value => no value
HTTP input encoding translation => disabled
mbstring.encoding_translation => Off => Off
mbstring.internal_encoding => no value => no value

Test script:
---------------
php -d default_charset='ISO-8859-1' -r
'var_dump(mb_internal_encoding());'
php -r 'ini_set("default_charset", "ISO-8859-1");
var_dump(mb_internal_encoding());'

Expected result:
----------------
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"

Actual result:
--------------
string(5) "UTF-8"
string(5) "UTF-8"

-- 
Edit bug report at https://bugs.php.net/bug.php?id=72992&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=72992&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=72992&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=72992&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=72992&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=72992&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=72992&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=72992&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=72992&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=72992&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=72992&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=72992&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=72992&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=72992&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72992&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=72992&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=72992&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=72992&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72992&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=72992&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=72992&r=mysqlcfg



Thread (19 messages)

« previous php.bugs (#203724) next »