[Mediawiki-l] ISO-8859-1 to UTF-8 questions.

anders.nygard at Uni2.se anders.nygard at Uni2.se
Thu Jan 5 14:09:38 UTC 2006


Hi y'all

Background

I have an old WIki in ISO-8859-1format and tried to upgrade to 1.5.4. I 
ran the upgrade1_5.php which stated should convert to UTF-8. The problem 
is that it didn't. upn closer inspection of the script it was clear that 
the global variable $wgUseLatin1 should have a non false value for it to 
convert enything. In an attempt to minimize side effects I set 
$wgUseLatin1=true in the subrotine that does the conversion. This gave me 
converted pagenames, but the page contents were still ISO. Strengthened by 
my success I simply applied the conversion subroutine on the data the 
comes from the cur.text field. This seems to have worked, as far as I can 
tell my data is now properly UTF-8 formatted.

Question

1. Mediawiki is supposed to convert old ISO format article text to UTF-8 
on the fly, right. How is this triggered, Do I need to set $wgUseLatin1 to 
get it to work or what.

2. I now have a converted wiki, converted as descibed above is there a 
downside my aproach. Does some text not get converted.

-------------------------------------------------
Anders Nygård
Operations Specialist
Gl. Køge Landevej 55
2500 Valby Denmark
Phone 45-7730 12 00
Direct 45-7730 12 74
Mobile 45-4144 38 77
www.uni2.dk



More information about the MediaWiki-l mailing list