This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author techtonik
Recipients amaury.forgeotdarc, jkloth, r.david.murray, serhiy.storchaka, techtonik
Date 2012-12-12.11:04:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAPkN8x+oiWruOk4BnAYg4atCxDF8WxuZRGxk+M=Kzm+aaa_LtA@mail.gmail.com>
In-reply-to <1355224165.52.0.841783247622.issue16656@psf.upfronthosting.co.za>
Content
>
> - Do you have a full traceback of the failing os.walk() in Python3.3?
>

Traceback (most recent call last):
  File "test.py", line 9, in <module>
    print(dirs)
  File "C:\Python33\lib\encodings\cp437.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position
18-24: character maps to <undefined>

> - What's the result of os.listdir(u'.') ?
>

>python3 -c "import os; print(os.listdir(u'.'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python33\lib\encodings\cp437.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position
41-47: character maps to <undefined>

>python2 -c "import os; print(os.listdir(u'.'))"
[u'English name', u'test.py', u'test2.py',
u'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f']

>python2 -c "import os; print(os.listdir('.'))"
['English name', 'test.py', 'test2.py', '??????? ???']
History
Date User Action Args
2012-12-12 11:04:15techtoniksetrecipients: + techtonik, amaury.forgeotdarc, jkloth, r.david.murray, serhiy.storchaka
2012-12-12 11:04:15techtoniklinkissue16656 messages
2012-12-12 11:04:15techtonikcreate