Follow-up Comment #8, bugs #1981 (project savane):
Since I have some issues at Savannah
(https://mail.gna.org/public/spam/2005-01/msg00428.html - hmm, what's this
doing in the spam???), here are some information:
- PHP is not sending any charset information by default; it can be configured
to set a site-wide charset that will be added in the Content-type HTTP
header.
- If no charset information is set by PHP, Apache adds Latin1 in the
Content-type header by default (the charset info is part of the Content-type
header); that can be changed too. It should not be removed for twisted
security reasons, unless the document is served as application/xml. Check the
link referenced in the Apache default configuration file (search for
'charset').
- Savane's template include an XML declaration that specify that the charset
used is UTF-8; this declaration has a lower precedence than the HTTP header.
Also, this declaration is normally not taken into account if the XML (here
XHTML) document is served as HTML (text/html - which is the default). It is
taken into account if the document is served as application/xml.
At this point, solutions include making PHP (or Savane's template) set the
content type: either it sets the content type as application/xml (and the
encoding becomes what is specified in the <?xml?> processing instruction);
either it sets the charset itself to, say, UTF-8.
Now, it is not that simple, because we do not know what encoding PHP will use,
independently of what the declaration we used.
Especially, my test install and Savannah have a strange behavior: when using
the French locale, output charset is latin1, and when using the German locale,
output charset is utf-8. However, at Gna!, output charset is latin1 for both
locales. All those are running Debian stable.
Note that localized texts are supposed to be automatically converted by
gettext to the charset specified by the user in his LANG/LC_ALL/...
environment variable (at least it works for console applications).
So the first step is to understand what charset is actually used by PHP (or by
gettext?) for its output and how to set it. The second step is to choose how
to describe it.
_______________________________________________________
This item URL is:
<http://gna.org/bugs/?func=detailitem&item_id=1981>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev