Use sys.getfilesystemencoding() to fix Unicode issues on Windows 7