Character encoding (UTF-8 vs ISO-8859-1)
| From: | Jan Fabry | Date: | Wed, 23 Jul 2003 22:58:45 +0000 |
| Subject: | Character encoding (UTF-8 vs ISO-8859-1) | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969355452@lists.php.net to get a copy of this message | ||
Hello,
The default encoding for the PHP manual is ISO-8859-1. Some other
languages get special encodings (you can find these in configure.in,
around line 655). This gives problems for some common languages. If you
take a look at the French translation of the echo function [
http://php.net/manual/fr/function.echo.php
], you see the character
entities (like é) in the code example aren't replaced by the
correct character.
This is because in the XML source file, code examples appear inside
<![CDATA[ ]]> sections, and entities aren't read there. If we could
place the correct character instead of the entity there (and in the rest
of the manual), these problems wouldn't occur.
I have noticed that this gives problems if the compilation happens in
the default ISO-8859-1 encoding, but not with UTF-8.
What would be the implication of changing the default encoding from
ISO-8859-1 to UTF-8? What would break? What changes in the source files
would be needed?
I have searched the list archives for an earlier discussion of this
subject, but couldn't find anything.
Greetings,
Jan Fabry