# Readcsv julia 0.6.0 not working properly

**URL:** <https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 27, 2017, 2:11pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905 "2017-03-27T14:11:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidbp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidbp/32/463_2.png) [@davidbp](https://discourse.julialang.org/u/davidbp)\
**Post date:** [March 27, 2017, 2:11pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905/1 "2017-03-27T14:11:10Z")

</div>

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:

```julia
"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?

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [March 28, 2017, 5:56pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905/2 "2017-03-28T17:56:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dan/32/42581_2.png) [@Dan](https://discourse.julialang.org/u/Dan)\
**Post date:** [March 28, 2017, 7:38pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905/3 "2017-03-28T19:38:47Z")

</div>

The bug is most probably in `tryparse_internal` for Booleans. Specifically, the change [https://github.com/JuliaLang/julia/commit/1297ede6cf40e0ad7e893fc4a2916a20a3df78ce](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.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [March 28, 2017, 8:58pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905/4 "2017-03-28T20:58:41Z")

</div>

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