[issue14253] print() encodes characters to native system encoding

2012-03-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Robert: this is not a bug. Python's IO stack has the fundamental assumption that streams are byte-oriented. So the "shouldn't be the output in Unicode" is not a possible solution, since Unicode cannot work on a byte stream. As a feature request, this is inde

[issue14253] print() encodes characters to native system encoding

2012-03-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Probably a duplicate of issue1602. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mai

[issue14253] print() encodes characters to native system encoding

2012-03-11 Thread Robert Sjöblom
New submission from Robert Sjöblom : 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