Description
wrong encoded files in a zip file gives unpacked a UnicodeDecodeError
if you add a file with a wrong encoding e.g. BF Onlinebrosch�re Sym 2008.pdf to a zip file and do upload this file.
Steps to reproduce
add a file with a wrong encoding e.g. BF Onlinebrosch�re Sym 2008.pdf to a zip file and do upload this file.
- unpack the file
- (on the dir you see this file is unzipped to the old name)
Attachments shows traceback.html
Example
Component selection
Details
MoinMoin Version |
1.6/1.7 |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
There is wikiutil.decodeUnknownInput (or similar), but that's about all we can do if we have no encoding information.
I can confirm this bug, my users found it yesterday ...
UnicodeDecodeError 'utf8' codec can't decode byte 0x84 in position 12: unexpected code byte * args = ('utf8', 'Brompropions\x84uremethylester BA.pdf', 12, 13, 'unexpected code byte') * encoding = 'utf8' * end = 13 * message = '' * object = 'Brompropions\x84uremethylester BA.pdf' * reason = 'unexpected code byte' * start = 12
Is there any way to fix the page (delete the broken attachment, etc.), as it doesn't render anymore...?
I fixed it, by renaming the attachment in the data/pages/<pagename>/attachments/ folder (it had a broken unicode character in the filename)
Plan
- Priority:
- Assigned to:
Status: duplicate of MoinMoinBugs/UnzipFilesWithNonAsciiName, fixed by http://hg.moinmo.in/moin/1.7/rev/ce632fad1b03