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

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...?

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/AttachmentUnzipCanCauseUnicodeDecodeError (last edited 2008-06-12 21:07:32 by ThomasWaldmann)