php.net |  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
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (25.0%)
From: nlopess@php.net Assigned: tony2001 (profile)
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-03-07 OS: *
Private report: No CVE-ID: None
 [2004-09-05 12:37 UTC] nlopess@php.net
Description:
------------
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

Patches

Pull Requests

History

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.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23421
 [2004-09-06 05:01 UTC] rasmus@php.net
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] tony2001@php.net
Assigned to myself so I don't forget to commit the patch.
 [2005-10-19 22:39 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 18:01:30 2024 UTC