Readcsv julia 0.6.0 not working properly

Hi guys,

In Julia Version 0.6.0-pre.alpha.116 (Commit 0e970f0 (2017-03-10 19:40 UTC) I cannot use readcsv to read the following:

"721","1438","1439","How does Quora quickly mark questions as needing improvement?","Why does Quora mark my questions as needing improvement/clarification before I have time to give it details? Literally within seconds…","1"

It says: UnicodeError: invalid character index

But I works perfectly with Julia version 0.6.0-dev.2069 (commit ff9a949)

Is it a bug?

A MWE for this is: readcsv(b"\"…\"")

I haven’t had time to track this down further, but the problem seems to be related to having a Unicode character as the last character in the field, as b""…a" works.

1 Like

The bug is most probably in tryparse_internal for Booleans. Specifically, the change https://github.com/JuliaLang/julia/commit/1297ede6cf40e0ad7e893fc4a2916a20a3df78ce tries to ignore leading and trailing spaces in an unsafe way. Guess a simple fix will do it.
Note the commit is on Feb 19, fitting the bug time range.

Fixed on master: https://github.com/JuliaLang/julia/pull/21201/files
Related issue is also fixed: https://github.com/JuliaLang/julia/pull/21202

1 Like