csv icon indicating copy to clipboard operation
csv copied to clipboard

CSV.decode! add additional \r\n to double quoted value containing \n

Open titib opened this issue 5 years ago • 1 comments

CSV.decode! add additional \r\n

{:ok, string_device1} = StringIO.open("\"one\ntwo\nthree\"")
string_device1 |> IO.stream(:line) |> CSV.decode!() |> Enum.each(&IO.inspect/1)

The result is

["one\n\r\ntwo\n\r\nthree"]

The expected behaviour is :

["one\ntwo\nthree"]

Tested on MacOS 10.14 / Elixir 1.6 / OTP 20

titib avatar Dec 06 '18 14:12 titib

Hi, this is current behaviour since this library operates line by line. Will fix this in upcoming versions.

beatrichartz avatar Mar 03 '19 03:03 beatrichartz

This is now fixed in 3.0.0. Please feel free to reopen if issues persist.

beatrichartz avatar Oct 24 '22 12:10 beatrichartz