[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: Apparently, you are using the interactive shell on Microsoft Windows. This will use the "OEM code page"; which one that is depends on the exact Windows regional version you are using. You shouldn't decode the string with 'latin-1', but with sys.stdin.encodin

[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Ezio Melotti
Ezio Melotti added the comment: This doesn't seem a bug to me, so you should ask for help somewhere else. You can try to pass a unicode arg to listdir to get unicode back, and double check what the input actually is. -- resolution: -> invalid stage: -> committed/rejected status: open

[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Hugo Silva
New submission from Hugo Silva : Hi all, I'm facing a huge encoding problem in Python when dealing with ISO-8859-1 / Latin-1 character set. When using os.listdir to get the contents of a folder I'm getting the strings encoded in ISO-8859-1 (ex: ''Ol\xe1 Mundo''), however in the Python interpr