Description

Unicode filename does not work in Win32 file system

Since there were many reports similar to this problem, I tested and tested it repeatedly but it still exists.

The error is raised when:

Steps to reproduce

  1. Upload a unicode-named file at a wiki page which saved in Windows file system.

Example

Details

traceback.html

MoinMoin Version

1.3.5, 1.5.3

OS and Version

Windows 2000, Windows XP sp2

Python Version

Python 2.4.2, 2.4.3

Server Setup

Server Details

Apache w/ ModPython; FastCGI; CGI, IIS

Client

Opera, IE, FireFox in Win32

Workaround

Do not use unicode-named attachements.

Discussion

I think that it cannot be fixed with a small patch. I'm not good at python or moinmoin but found that win32 uses 'mbcs' as encoder of file system and moinmoin uses 'utf-8' by default. Thus, when you save a file with utf-8 filename encoded from unicode-named in win32, it raises an IOError or UnicodeDecodeError. (BTW it works fine in the other file systems such as this wiki to use unicode-named files.) For example,

We can resolve this problem if we quote the filename as wiki page name does, but we cannot use file direct-copying. (may cause more problems)

Or we can do if we change the moinmoin to use file system codec (sys.getfilesystemencoding()) to encode the filename but migration among different file systems with different encoding could be difficult or not possible.

-- SeungikLee 2006-05-30 14:40:12

MoinMoin would need to special case platforms with unicode filesystem semantics. This would be a major change. 1.6 will have another storage method anyway that enforces escaped names, so the solution would be different there. Because of that, I am closing the bug. -- AlexanderSchremmer 2006-05-30 15:08:27

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/UnicodeFileNameFailsInWin32 (last edited 2007-10-29 19:13:49 by localhost)