On Fri, Jan 17, 2014 at 2:10 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote:
> On Fri, Jan 17, 2014 at 1:44 PM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote:... > ... > No latin1 de/encoding is required for anything, I don't know why you would > want do to that in this context. > Does opening latin1 files even work with current loadtxt? > It currently uses UTF-8 which is to my knowledge not compatible with > latin1. > just tried it, doesn't work so there is nothing we need to keep working: f = codecs.open('test.txt', 'wt', encoding='latin1') f.write(u'Öö\n') f.close() np.loadtxt('test.txt') ValueError: could not convert string to float: �� or UnicodeDecodeError: if provided with unicode dtype there are a couple more unicode issues in the test loading (it converts to bytes even if unicode is requested), but they look simple to fix.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion