Description

Bug became obvious after upgrading from Python 2.4.1 to 2.4.2 since urllib.unquote was changed in the Python standard library.

Steps to reproduce

  1. Upload attachment with non-ascii name like äöü.txt

  2. Look at RecentChanges

Details

filename undefined, urllib = <module 'urllib' from 'C:\Python24\Lib\urllib.py'>, urllib.unquote = <function unquote>, line = <MoinMoin.logfile.editlog.EditLogLine instance>, line.extra = u'br%C3%BCckner_sapporo_20050930.doc'

res = [u'br', u'C3', u'BCckner_sapporo_20050930.doc'], i = 1, global _hextochr = {'00': '\x00', '01': '\x01', '02': '\x02', '03': '\x03', '04': '\x04', '05': '\x05', '06': '\x06', '07': '\x07', '08': '\x08', '09': '\t', ...}, item = u'C3'

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

}}}

Bug is not reproducible in this Wiki!

MoinMoin Version

1.3.4

OS and Version

Win XP Pro SR2

Python Version

2.4.2 ( <!> no Bug with 2.4.1)

Server Setup

Apache 2.0.54, modpython 3.2.0b

Workaround

Discussion

Please upgrade to 1.3.5. I'm not sure it will work there, but we can't support old versions of 1.3. A similar patch like you suggest was made in 1.5 branch few weeks ago.

You will have to apply similar patch to info action code, or Unicode attachments names in the page history will be displayed in a wrong way, or may raise the same exception that you get with Python 2.4.2.

You can get the patches used in 1.5 with tla:

tla get arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-925
tla get arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-932

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/RecentChangesProblemForUnicodeAttachmentNames (last edited 2007-10-29 19:14:24 by localhost)