Page MenuHomePhabricator

Can't reupload images with Ö as first character
Closed, ResolvedPublic

Description

Author: fred_chessplayer

Description:
Hi. I can't reupload an image with Ö as first character.

Following a conversation on the Wikimedia Commons Village Pump:
http://commons.wikimedia.org/wiki/Commons:Village_pump#Bug_report

which goes as follows:

Bug report

I've trying to reupload "[[:image:Östergötland coat of arms.png]]" but the uploading
insists on renaming it into "[[:image:Stergötland coat of arms.png]]" / [[User:Fred
chessplayer|Fred Chess]] 15:04, 19 January 2006 (UTC)

: I experience the same thing, with Firefox on Linux. It appears to be a server-side
problem. File a report on [http://bugzilla.wikimedia.org bugzilla]?
[[User:dbenbenn]] 19:18, 19 January 2006 (UTC)

::Attempted same upload via Internet Explorer. [... Didn't
work] '''[[User:Bastique|Bas]]''' <sup>'''[[User talk:Bastique|parler]]'''</sup>


I can't remember if it worked to reupload such filesbefore on Wikimedia Commons.
However, it did work on Swedish Wikipedia as late as December 2005, as you can see
from http://sv.wikipedia.org/wiki/Bild:%C3%96sterg%C3%B6tland.png .


Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz4679

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 9:02 PM
bzimport set Reference to bz4679.

gangleri wrote:

Hallo!

Please see
http://commons.wikimedia.org/wiki/special:Prefixindex/%D6?namespace=6

Please identify exactly the OS and browser versions.

Both IE and Firefox allows you to change "View" | "Character Encoding" | Unicode
(UTF-8) . What setting was used?

It seams that the browser of the reporter is sending an invalid character with a
value between 128 and 255 (I do not know which one).

Try also to paste the name at http://pastebin.com/ .

best regards reinhardt [[user:gangleri]]

Confirmed something seems to be borked; tested IE 6.0 on WinXP SP2. Looking into
it...

This may be a bug in PHP. The filename gets trimmed with the basename() function;
with PHP 5.0.5 and 5.1.2 on Linux systems I'm seeing this broken behavior:

<?php echo basename("Östergötland_coat_of_arms.png") . "\n"; ?>
stergötland_coat_of_arms.png

With PHP 4.4.0 on Linux, and both PHP 4 and 5 on Mac OS X, I'm seeing the correct
result:
Östergötland_coat_of_arms.png

Seems to be a widespread problem:
http://bugs.php.net/bug.php?id=33898

Not quite sure why I can't replicate it on my Mac, but I can on three separate
Linux setups...

Will work around it by reimplementing basename(), since PHP folks don't seem to
give a shit about it.

Fixed on HEAD; added a wfBaseName() function which just does a regex. This version
also understands "\" as well as "/" on both Unix and Windows; PHP's own basename()
only understands "\" on Windows and Netware.

Removing bogus tracking bug; not a character conversion issue.

gangleri wrote:

Thanks Brion!

I was thinking about different codings für Ö (as %D6, %C3%96 and other OS
depending codings).

In comment 1 I used:
http://commons.wikimedia.org/wiki/special:Prefixindex/%D6?namespace=6
The correct Unicode encoding is:
http://commons.wikimedia.org/wiki/special:Prefixindex/%C3%96?namespace=6

best regards reinhardt [[user:gangleri]]

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:19 AM
Gilles added a project: Multimedia.
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:21 AM