On 08/06/06, Brion Vibber <brion(a)pobox.com> wrote:
Can you:
1) Show the exact error message if there is one
2) Describe the exact difference between actual and expected behavior if there
isn't an error message
?
OK then. Apologies in advance for the length of this message.
I am running MediaWiki as follows:
Special:Version
* MediaWiki: 1.6.3
* PHP: 4.4.2 (apache)
* MySQL: 4.1.9
* Extensions:
o Parser hooks:
+ ParserFunctions by Tim Starling
+ StringFunctions v1.2.1
o Extension functions:
+ wfSetupParserFunctions and wfStringFunctions
This is the version linked to PHP which is different from the command
line version of mysql:
$ mysql --version
mysql Ver 14.7 Distrib 4.1.20, for portbld-freebsd4.11 (i386) using
readline 5.1
I make a database dump as follows:
$ mysqldump --user=x --host=y -p --hex-blob z > z.sql
The file is then compressed, and copied to my local computer, and
uncompressed again.
On my home computer I am using MediaWiki as follows:
Special:Version
* MediaWiki: 1.6.5
* PHP: 5.1.2 (apache2handler)
* MySQL: 5.0.18
* Extensions:
o Parser hooks:
+ ParserFunctions by Tim Starling
o Extension functions:
+ wfSetupParserFunctions
$ mysql --version
mysql Ver 14.12 Distrib 5.0.18, for redhat-linux-gnu (i386) using readline 5.0
Now, an article title such as Rōmaji r (that is r o-macron maji)
copied to the file results in, for example, the following in the SQL
file produced by mysqldump:
/*!40000 ALTER TABLE `categorylinks` DISABLE KEYS */;
LOCK TABLES `categorylinks` WRITE;
INSERT INTO `categorylinks` VALUES ...,(1591,'Pronunciation','RÅ?maji
r','2006-04-15 18:05:01'), ... ;
I've truncated this line because it was extremely long and one of
several typical examples.
Notice here that the "ō" (o-macron) has mutated into "Å?".
I then edit the SQL file to add a "create database" header:
DROP database IF EXISTS `z`;
CREATE database `z`;
use `z`;
and feed this into the mysql database:
$ mysql -u root -p < z.sql
I get the following error:
ERROR 1062 (23000) at line 423: Duplicate entry '1336-0-%G�%@??' for key 1
I then use "--force" to override the error:
mysql -u root -p --force < z.sql
Enter password:
ERROR 1062 (23000) at line 423: Duplicate entry '1336-0-%G�%@??' for key 1
Line 423 actually is the following:
INSERT INTO `pagelinks` VALUES ...
Now I log into the Wiki and look at the pages.
The page "rōmaji r" is now a redlink containing no text. If I look at
Special:Allpages I find an entry which I've cut and pasted here:
R%G�%@?maji r
If I look at the text of this page, I find the following:
"There is currently no text in this page, you can search for this page
title in other pages or edit this page"
Similarly for a number (about twenty or thirty) of other articles
which feature non-ascii utf8 names, the link appears on "allpages" but
the article is empty. Another thing: if I do a text search for text
which I know is in the article, then it shows a link to the article.
Things I have tried doing include editing the SQL file to change the
wrong characters back into the correct utf-8. There are about 400
o-macron characters which have gone wrong. I tried putting them in as
"ō" and also in the "u8..." format which seems to be used elsewhere
in
the file. This resulted in partial success in that the article text
was found where the article title was, but failure in that the article
title contained either a question mark in place of the utf-8 in the
case of replacing with a utf-8 macroned o, or unconverted in the case
of the u8... format.
Thank you for any assistance, suggestions or advice.