<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 17, 2014 at 1:44 PM, Oscar Benjamin <span dir="ltr"><<a href="mailto:oscar.j.benjamin@gmail.com" target="_blank">oscar.j.benjamin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Jan 17, 2014 at 10:59:27AM +0000, Pauli Virtanen wrote:<br>
> Julian Taylor <jtaylor.debian <at> <a href="http://googlemail.com" target="_blank">googlemail.com</a>> writes:<br>
> [clip]<br>
</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
> > For backward compatibility we *cannot* change S.<br>
<br>
</div>Do you mean to say that loadtxt cannot be changed from decoding using system<br>
default, splitting on newlines and whitespace and then encoding the substrings<br>
as latin-1?<br></blockquote><div><br></div><div>unicode dtypes have nothing to do with the loadtxt issue. They are not related.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
An obvious improvement would be along the lines of what Chris Barker<br>
suggested: decode as latin-1, do the processing and then reencode as latin-1.<br></blockquote><div><br></div><div>no, the right solution is to add an encoding argument.<br></div><div>Its a 4 line patch for python2 and a 2 line patch for python3 and the issue is solved, I'll file a PR later.<br>
</div><div><br></div><div>No latin1 de/encoding is required for anything, I don't know why you would want do to that in this context.<br></div><div>Does opening latin1 files even work with current loadtxt?<br>It currently uses UTF-8 which is to my knowledge not compatible with latin1.<br>
</div></div></div></div>