<div dir="ltr">I'm not sure if this is the issue, but could you try specifying the encoding directly? LANG=C doesn't do anything on my machine, so I can't reproduce the error and test this myself.<div><br></div><div>LANG=C python3.5 -c "h = open('xml_2218_blastp_002.xml', encoding='utf-8'); print(h.read(400))"</div><div><br></div><div>Thanks,</div><div>Shyam</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 20, 2016 at 6:51 AM, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
Do any of you have first hand experience of unicode encoding<br>
issues with XML parsing? I'm hoping for some help with this issue:<br>
<br>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position<br>
313: ordinal not in range(128)<br>
<br>
<a href="https://github.com/biopython/biopython/issues/855" rel="noreferrer" target="_blank">https://github.com/biopython/biopython/issues/855</a><br>
<br>
I believe this problem stems from how Alejandro Schäffer is<br>
*sometimes* written in the BLAST XML output:<br>
<br>
<a href="https://github.com/biopython/biopython/issues/855#issuecomment-226276235" rel="noreferrer" target="_blank">https://github.com/biopython/biopython/issues/855#issuecomment-226276235</a><br>
<br>
Thanks,<br>
<br>
Peter<br>
<br>
_______________________________________________<br>
Biopython-dev mailing list<br>
<a href="mailto:Biopython-dev@mailman.open-bio.org" target="_blank">Biopython-dev@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython-dev" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython-dev</a></blockquote></div><br></div></div>