Last modified: 2012-07-14 10:01:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32845, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30845 - Use a meaningful file name for the download
Use a meaningful file name for the download
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 31552
  Show dependency treegraph
 
Reported: 2011-09-10 10:11 UTC by T. Gries
Modified: 2012-07-14 10:01 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2011-09-10 10:11:52 UTC
When you download for example the MW Developers Guide
http://www.mediawiki.org/w/index.php?title=Special:Book&bookcmd=render_collection&colltitle=User:Wikinaut/Books/MediaWiki_Developer%27s_Guide&writer=rl

you'll get a PDF file titled "collection.pdf" when storing the PDF.

Suggestion
==========

Better would be a meaningful file name title which corresponds to the Wiki book/collection page title. Non-ASCII character need to be stripped, or transliterated or url-encoded, and spaces replaced with underscore.
Comment 1 Kelson [Emmanuel Engelhart] 2012-06-10 10:28:23 UTC
Same problem with ZIM files, "collection.zim".
Comment 2 Christoph Kepper 2012-07-13 22:09:34 UTC
I just submitted a patch for this bug: gerrit change I0c53d31e43354a63dcc115b59a961e43bb86e8c4

It still has a few issues though:
- it works only for Latin-1
- Accented characters will be converted to ASCII
- Everything else will be dropped
- If everything is dropped, "collection" + EXT will be used as filename
Comment 3 Santhosh Thottingal 2012-07-14 03:03:36 UTC
(In reply to comment #0)
> Better would be a meaningful file name title which corresponds to the Wiki
> book/collection page title. Non-ASCII character need to be stripped, or
> transliterated or url-encoded, and spaces replaced with underscore.

Please don't forget that titles in non-english wiki projects are completely Non-ASCII. So don't drop them :)
What issue do you see when file name contains valid UTF-8 characters?
Comment 4 Christoph Kepper 2012-07-14 10:01:12 UTC
This is a quick fix. HTTP can only handle ASCII characters by default. RFC 5987 describes a way to handle UTF-8 filenames, but this requires some additional work and will not work in legacy browsers.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links