[pmwiki-users] Headers are not sending charset !

Athan foxx at freemail.gr
Mon Mar 12 01:51:47 CDT 2007


"Patrick R. Michaud" <pmichaud at pobox.com> wrote in message 
news:20070311230731.GE1629 at host.pmichaud.com...

> Which xlpage-* scripts aren't properly setting $HTTPHeaders?
> (I know that several of them do not set $HTMLHeaderFmt yet... but
> all of them should be setting $HTTPHeaders.)

Patrick,

The problem is that most people, including myself, expect that the 
xlpage-i18n encoding, declared in translation XLPage, will be automatically 
injected in both http and html headers (a w3c recommentation). Unfortunately 
that is only happening with encodings that have an associated i18n file 
(iso-8859-2, 9, 13 and utf-8). For the rest ones (e.g. 8859-7), pmwiki sends 
8859-1 in http headers and nothing in html headers, something definately 
wrong.

i18n files contain at least the following assignment:
$HTTPHeaders[] = "Content-type: text/html; charset=iso-8859-xx;"

Core includes i18n files as followes...
    if (@$xl['xlpage-i18n']) {
      $i18n = preg_replace('/[^-\\w]/','',$xl['xlpage-i18n']);
      include_once("$FarmD/scripts/xlpage-$i18n.php");
    }

Sorry but I still don't understand why isn't possible for core to assign 
encoding in both http and html header, before including xlpage-$i18n.php
That way, pmwiki will always include the right html/http header, even when 
there is no xlpage-$i18n.php file available.

Regards
Athan 





More information about the pmwiki-users mailing list