|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29983 default_charset not set by ini_set
Submitted: 2004-09-05 12:37 UTC Modified: 2005-10-19 22:39 UTC
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (25.0%)
From: Assigned: tony2001 (profile)
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-03-07 OS: *
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.
Bug Type:
New email:
PHP Version: OS:


 [2004-09-05 12:37 UTC]
default_charset is marked as PHP_INI_ALL but I can't set it using ini_set. If I set it throught .htaccess it works fine.

Reproduce code:
ini_set('default_charset', 'UTF-8');

Expected result:
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8

Actual result:
HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-05 15:11 UTC] smacvicar at gmail dot com
It doesn't appear to send a charset entry when specified and you end up with the AddDefaultCharset entry from Apache 2 which is ISO-8859-1.
 [2004-09-06 05:01 UTC]
Verified.  Doesn't look Apache2-specific to me.  It has to do with the way we apply it, or rather don't apply it if we already see one set.
 [2005-06-22 23:29 UTC]
Assigned to myself so I don't forget to commit the patch.
 [2005-10-19 22:39 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 10:01:29 2024 UTC