New submission from Robert Sjöblom <robert.sjob...@gmail.com>: I'm on a cp932-encoded system. When I read in a cp1252-file, it's read into memory properly, but when printing it, Python tries to encode the output to cp932. Here's the relevant code:
address = "C:/Path/to/file/file.ext" with open(address, encoding="cp1252") as alpha: print(line, end="") Traceback (most recent call last): File "C:\Python32\parser.py", line 8, in <module> print(line) UnicodeEncodeError: 'cp932' codec can't encode character '\xe9' in position 13: illegal multibyte sequence Shouldn't the output be in unicode? ---------- components: Unicode messages: 155393 nosy: Robert.Sjöblom, ezio.melotti priority: normal severity: normal status: open title: print() encodes characters to native system encoding type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14253> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com