I've run a cleanup script to fix uploaded image records with invalid titles, uploaded under older, buggier versions of MediaWiki. These fell into mainly these categories:
* Filenames with %HH hex codes * Filenames with non-normalized Unicode sequences * Filenames with Latin-1 encoding * Blank database entries * Filenames with other illegal chars ("[" and "{")
Where the file could not be located, the entry was removed from the database. Where it was present, the filename was normalized and the record and the file renamed. Names conflicting with existing titles have had a number appended.
Complete list of changes (be sure to view in UTF-8):
http://download.wikimedia.org/tools/bad-image-fixes.txt
-- brion vibber (brion @ pobox.com)