Last modified: 2010-01-23 15:43:51 UTC
Hi, I recently noticed that the API for Wikipedia adds [[U+FFFD]] (they eventually show up like question marks in a little diamond) at the end of all strings returned by the following API request: * http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap My bot bumped on this on <i>en.wikipedia.org</i> and was unable to get the interwiki list from the site. Strangely enough this seems to happen only here as other Wikipedia wikis don't exhibit this behaviour. A few examples: * http://fr.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap * http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap * http://zh.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap My guess is that the database table “interwiki” contains extra characters after each field, on my MediaWiki server this is what I see: mysql> desc interwiki ; +-----------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+---------------+------+-----+---------+-------+ | iw_prefix | varbinary(32) | NO | PRI | NULL | | | iw_url | blob | NO | | NULL | | | iw_local | tinyint(1) | NO | | NULL | | | iw_url | tinyint(1) | NO | | NULL | | +-----------+---------------+------+-----+---------+-------+ you can confirm that all “prefix” fields in the XML returned by <i>en.wikipedia.org</i> are exactly 32 characters long so the var in varbinary() is not used or the code reading that field has a problem. Thank, Regards,
WMF sites use an interwiki cache (using DBA handlers), not the interwiki table.
*** This bug has been marked as a duplicate of bug 21818 ***