Page MenuHomePhabricator

broken interwikiprefix
Closed, ResolvedPublic

Description

The follow prefixes are define in "interwiki map" with space or non-ASCII-Letter, but doesn't work, see URL:
*[[osi reference model:]]
*[[zzz wiki:]]
*[[Ĉej:]]

The follow prefix is define with underline and works:
*[[doom_wiki:]]

(based on: http://download.wikimedia.org/dewiki/20081011/dewiki-20081011-interwiki.sql and http://de.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap)

Must the definition in [[meta:interwiki map]] are urlencode? In my opinion it is better, wenn the script can do this or MediaWiki can work without needing of urlencode in interwiki-table.


Version: unspecified
Severity: normal
URL: http://test.wikipedia.org/wiki/Interwiki-table

Details

Reference
bz16356

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:28 PM
bzimport set Reference to bz16356.

Created attachment 7246
patch, to show what is the problem

The problem is, that the input from [[m:Interwiki map]] in dumpInterwiki.inc is not normalized the same way as in Interwiki::fetch().

Interwiki::fetch use $wgContLang->lc().
dumpInterwiki.inc use strtolower, this fails with mulitbytes, so the interwiki [[Ĉej:]] is not linked korrekt.

All datatables store the titlekeys with underscores, so spaces should replaced by underscores.

Attached:

This patch looks good to me, but i have little experience in this area. Adding review keyword and setting to maintenance script category.

Looks fine to me, feel free to apply.