|  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
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-03-07 OS: *
Private report: No CVE-ID:
 [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-2015 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 01:01:34 2015 UTC