<br><br><div class="gmail_quote">On Thu, Jan 29, 2009 at 12:09 PM, Anjanesh Lekshminarayanan <span dir="ltr"><<a href="mailto:mail@anjanesh.net">mail@anjanesh.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> It does auto-detect it as cp1252- look at the files in the traceback and<br>
> you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong<br>
> encoding, try opening it as utf-8 or latin1 and see if that fixes it.<br>
<br>
</div>Thanks a lot ! utf-8 and latin1 were accepted !<br>
<div><div></div><div class="Wj3C7c">--</div></div></blockquote><div><br>If you want to read the file as text, find out which encoding it actually is. In one of those encodings, you'll probably see some nonsense characters. If you are just looking at the file as a sequence of bytes, open the file in binary mode rather than text. That way, you'll avoid this issue all together (just make sure you use byte strings instead of unicode strings).<br>
</div></div><br>