Python 2.7.3 getdefaultencoding: ascii getfilesystemencoding: mbcs getpreferredencoding(False): cp1252 getpreferredencoding(True): cp1252 ----- os.listdir(b'.') 4 ['English name', 'test.py', 'tests.py', '??????? ???'] ----- os.listdir(u'.') 4 [u'English name', u'test.py', u'tests.py', u'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f'] ----- os.stat(b'Русское имя') Traceback (most recent call last): File "tests.py", line 32, in print(os.stat(b'Русское имя')) WindowsError: [Error 2] The system cannot find the file specified: '\xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xbe\xd0\xb5 \x0\xb8\xd0\xbc\xd1\x8f' ----- os.stat(u'Русское имя') nt.stat_result(st_mode=16895, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0L, st_atime=1355309608L, st_mtime=155309608L, st_ctime=1355309608L)