Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-2655 now.

supress AddDefaultCharset (fix completed in vcs)

in apache, if there is an
Code: Select all
AddDefaultCharset

setting (either global or local), it overrides the
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />


this may be a problem especially when installing olympus in a subdirectory of an existing site, when there is an AddDefaultCharset setting for the site.
since olympus already uses a .htaccess file, the solution is very simple:
add a
Code: Select all
AddDefaultCharset Off
line to the .htaccess, and everyone will be happy.
this was/is a problem to many phpbb installation, even with phpbb-2. the problem exists mainly for non-english sites, especially where that language has more than one possible encoding, adding this one line to .htaccess will solve most of them.

Comments / History

Posted by Acyd Burn (Server Manager) on Dec 26th 2006, 13:31

Adding something to htaccess is not really an option, especially because this .htaccess file is not part of the distribution. I really can not believe that Apache is overwriting the charset, because normally the AddDefaultCharset is used for conditions where no charset (or an unknown one) can be determined - it is to provide a default fallback for those conditions.

From the manual to back up the above:
This directive specifies the name of the character set that will be added to any response that does not have any parameter on the content type in the HTTP headers.


Are you just guessing here or do you experience such a problem by yourself? If the latter, is the "send encoding" option within the ACP set to Yes or No for you.

Posted by arod-1 on Dec 27th 2006, 14:49

i actually did experience these problems, (mainly with phpbb 2): i was not aware of the "send encoding" setting in the ACP.
from preliminary testing, it seems that if "send encoding" is set to yes, there is no problem, and the AddDefaultCharset is overridden even when set.

a question, then:
why even have the "send encoding" config option? is there any conceivable situation where you would not want to send the encoding? iiuc, this config option is just another way the user can shoot themselves in the foot (like i did), with no added value. imho, the right thing to do is to remove this option, and always send the encoding in the header.

just my 2c.

Posted by Acyd Burn (Server Manager) on Dec 27th 2006, 15:30

You are right... the send encoding option might be useful for some people to overwrite the encoding for their other pages, but generally we should not allow such overcomings as well as - like you said - it might give more problems than it solves.

Ticket details