php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70035 mbstring.internal_encoding is not derived from internal_encoding
Submitted: 2015-07-09 13:04 UTC Modified: 2016-09-09 06:30 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hoch at fidion dot de Assigned: yohgaki (profile)
Status: Closed Package: mbstring related
PHP Version: 5.6.10 OS: gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hoch at fidion dot de
New email:
PHP Version: OS:

 

 [2015-07-09 13:04 UTC] hoch at fidion dot de
Description:
------------
mbstring.internal_encoding defaults to UTF-8 even if internal_encoding is defined differently.

; The precedence is: default_charset < internal_encoding < iconv.internal_encoding

This appears to be incorrect.

Test script:
---------------
php -i | grep encoding

input_encoding => ISO-8859-1 => ISO-8859-1
internal_encoding => ISO-8859-1 => ISO-8859-1
output_encoding => ISO-8859-1 => ISO-8859-1
mbstring.internal_encoding => no value => no value

php -r 'echo mb_internal_encoding();'

UTF-8

After setting mbstring.internal_encoding = "ISO-8859-1"

input_encoding => ISO-8859-1 => ISO-8859-1
internal_encoding => ISO-8859-1 => ISO-8859-1
output_encoding => ISO-8859-1 => ISO-8859-1
mbstring.internal_encoding => ISO-8859-1 => ISO-8859-1

php -r 'echo mb_internal_encoding();'

ISO-8859-1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-16 06:39 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2015-07-16 08:26 UTC] yohgaki@php.net
Found the cause. NULL (not empty string) setting skips module's ini setting initialization code.
 [2016-09-09 06:30 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed
 [2016-09-09 06:30 UTC] yohgaki@php.net
This should be fixed. If problem persist, please reopen.
BTW, INI settings are not propagated, but if lower encoding setting is empty, higher precedence setting will be used.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 19:01:31 2024 UTC