[Mediawiki-l] trouble with charsets
Moritz Karbach
mailinglist at karba.ch
Sat Feb 17 23:00:11 UTC 2007
Hi,
I'm having some nasty trouble with charsets. Consider the wiki_categorylinks
table.
It's shown correctly in phpMyAdmin, which displays utf8 pages (at least all
german umlauts look well when I select utf8 in my browser). Mysqldumping this
works fine, I get an correct utf8 file. Importing this again works fine if I
select utf8 encoded file.
But the wiki keeps displaying screwed umlauts, like "ä" or "ä" instead
of "ä", depending on which encoding I chose in my browser, but no encoding
seems to work fine.
Setting $wgDBmysql5 to true in LocalSettings.php doesn't help.
I also noticed that the browser seems to reload the page when I change
encodings (both Iceweasel and konqueror do so). Does the wiki figure out
which encoding the browser expects and changes it accordingly (screws it in
my case)?
The funny thing is that I got a second version of this wiki on the same
server, in which all is displayed ok. I noticed the described behaviour as I
tried to backup the thing. In the working version, the umlauts look bad in
phpMyAdmin and in the dumps, but well in the wiki. If I import such a bad
looking dump, it starts looking bad in the wiki as well.
I can convert these dumps to valid uft-8 displaying umlauts correctly by doing
$ iconv -t latin1 -f utf-8 -c wiki_categorylinks.sql -o bar
$ file bar
bar: UTF-8 Unicode text
MediaWiki: 1.5.8 (I know it's too old)
PHP: 5.2.1 (cgi-fcgi)
MySQL: 5.0.27-max-log
working version: http://www.karba.ch/mowiki/Kategorie:Chinesisch
screwed version: http://www.heelhook.de/mowiki/Kategorie:Chinesisch
Any help is apreciated!
- Mo
More information about the MediaWiki-l
mailing list