Re: [Python-Dev] Unicode decode exception

2014-11-30 Thread Terry Reedy
On 11/30/2014 3:07 AM, balaji marisetti wrote: Hi, When I try to iterate through the lines of a file("openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c"), I get a UnicodeDecodeError (in python 3.4.0 on Ubuntu 14.04). But there is no such error with python 2.7.6. What could be the problem? Questions ab

Re: [Python-Dev] Unicode decode exception

2014-11-30 Thread Bruno Cauet
Did you try opening it as a binary file? open(filename, 'rb'): — Tagada tsouin tsouin On Sun, Nov 30, 2014 at 5:06 PM, balaji marisetti wrote: > Hi, > When I try to iterate through the lines of a > file("openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c"), I get a > UnicodeDecodeError (in python

Re: [Python-Dev] Unicode decode exception

2014-11-30 Thread Chris Angelico
On Sun, Nov 30, 2014 at 7:07 PM, balaji marisetti wrote: > Hi, Hi. This list is for the development *of* Python, not development *with* Python, so I'm sending this reply also to python-l...@python.org where it can be better handled. You'll probably want to subscribe here: https://mail.python.org

[Python-Dev] Unicode decode exception

2014-11-30 Thread balaji marisetti
Hi, When I try to iterate through the lines of a file("openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c"), I get a UnicodeDecodeError (in python 3.4.0 on Ubuntu 14.04). But there is no such error with python 2.7.6. What could be the problem? In [39]: with open("openssl-1.0.1j/crypto/bn/asm/x86_64-gcc.c"