Alexander Prudnikov wrote:
I have 2 questions about UTF-8 encoding in wiki.
- How is the UTF-8 encoding encoded and decoded into other encodings?
Where in the sources can I find it? And what additional libraries or software (except php, apache etc.) should I have in order to encode/decode UTF-8?
Your PHP must have the XML module installed (it is installed by default) which provides utf8_encode and utf8_decode functions. If you have iconv support compiled in this will be used instead, which may be necessary for URL encoding compatibility conversion for non-Western languages.
- How can I define (in the code) what encoding my Wiki uses? I mean what
variable contain information about the encoding?
As of 1.3 the default encoding for all languages is UTF-8.
Latin-1 compatibility mode is enabled by setting $wgUseLatin1 = true; in LocalSettings.php; this will downconvert the UTF-8 text in the language file to Latin-1 as needed and mark the pages with the encoding marker for ISO-8859-1 instead of UTF-8.
-- brion vibber (brion @ pobox.com)