|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80841 Warning if default_charset is set to windows-1256
Submitted: 2021-03-06 19:42 UTC Modified: 2021-03-08 13:03 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: muhannad17 at gmail dot com Assigned:
Status: Open Package: PHP options/info functions
PHP Version: 8.0.3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: muhannad17 at gmail dot com
New email:
PHP Version: OS:


 [2021-03-06 19:42 UTC] muhannad17 at gmail dot com
When you try to set the default_charset ini setting to "Windows-1256" dynamically inside a php script a warning will show as the following :

Warning: ini_set(): Unknown encoding "windows-1256" in ini setting in *.php on line *

Warning: ini_set(): INI setting contains invalid encoding "windows-1256" in *.php on line *

The (default_charset) setting is set without any issues and the page renders in "windows-1256" without any encoding issues except the warnings.

This bug is only appears in PHP 8. PHP 7.4 doesn't have this issue.

Test script:

Expected result:
No Warnings,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-08 13:03 UTC]
-Type: Bug +Type: Documentation Problem -Package: *General Issues +Package: PHP options/info functions
 [2021-03-08 13:03 UTC]
Raising a warning in case of an unsupported encoding is a
deliberate change[1].  It might be worthwhile to document that.

[1] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC