3 | | Most file system related functions in Python (like {{{os.stat}}}) accept unicode strings which are then encoded using the default encoding of the file system (see http://docs.python.org/library/sys.html#sys.getfilesystemencoding). This is actually the only sane thing to do - if you pass a manually encoding string you'll have no guarantee it will match what was actually written on the FS. On Unix platforms, this depends on the user's *locale*. Thus if the user you're running the server on, doesn't have a properly set {{{LC_ALL}}}, {{{LANG}}}, etc. in his enviroment, the FS encoding will be assumed ASCII and os.stat will crash. |
| 3 | Most file system related functions in Python (like {{{os.stat}}}) accept unicode strings which are then encoded using the default encoding of the file system (see http://docs.python.org/library/sys.html#sys.getfilesystemencoding). This is actually the only sane thing to do - if you pass a manually encoded string you'll have no guarantee it will match what was actually written on the FS. On Unix platforms, this depends on the user's *locale*. Thus if the user you're running the server on, doesn't have a properly set {{{LC_ALL}}}, {{{LANG}}}, etc. in his enviroment, the FS encoding will be assumed ASCII and os.stat will crash. |