Readdlm: ignore_invalid_chars option does not exist anymore


#1

I had a script which using the kw-option ignore_invalid_chars (julia 0.4) read a file fine. Now this option does not exist anymore (https://github.com/JuliaLang/julia/pull/16058) and running it without it on my file gives:

julia> readdlm("AD281106_example.CSV")                                                                                                                
ERROR: at row 2, column 3 : UnicodeError: invalid character index)                                                                                    
Stacktrace:                                                                                                                                           
 [1] dlm_parse(::String, ::Char, ::Char, ::Char, ::Char, ::Bool, ::Bool, ::Bool, ::Int64, ::Bool, ::Base.DataFmt.DLMOffsets) at ./datafmt.jl:610      
 [2] readdlm_string(::String, ::Char, ::Type, ::Char, ::Bool, ::Dict{Symbol,Union{Char, Integer, Tuple{Integer,Integer}}}) at ./datafmt.jl:343        
 [3] #readdlm_auto#11(::Array{Any,1}, ::Function, ::String, ::Char, ::Type{T} where T, ::Char, ::Bool) at ./datafmt.jl:132                            
 [4] #readdlm#7 at ./datafmt.jl:81 [inlined]                                                                                                          
 [5] readdlm(::String, ::Char, ::Char) at ./datafmt.jl:81                                                                                             
 [6] #readdlm#5(::Array{Any,1}, ::Function, ::String) at ./datafmt.jl:64                                                                              
 [7] readdlm(::String) at ./datafmt.jl:64                                                                                                             

The file can be found here: https://gist.github.com/mauro3/8bf1448cf05356458710c02572722c88

I’m after a quick fix…


Unicode related error when reading a .csv