Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quoted value at start of line doesn't parse correctly #1

Open
rjrudin opened this issue Jul 1, 2016 · 1 comment
Open

Quoted value at start of line doesn't parse correctly #1

rjrudin opened this issue Jul 1, 2016 · 1 comment

Comments

@rjrudin
Copy link

rjrudin commented Jul 1, 2016

Hey @masyukun , great library here. Ran into one issue though:

let $text := 'Test1,Test2
"1a,1a2",1b,
2a,"2b,2b2"
'
return csv:parseFile($text, true())

Returns:

"1a1a2"1b
2a"2b,2b2"

It appears that when the first value in a row has double quotes around it, the double quotes are not processed correctly, and you get two fields instead of just one.

@masyukun
Copy link
Owner

Just saw this -- I'll take a look at it. Eyeballing your input, you would be expecting:
START
1 = Test1
2 = Test2
"1a,1a2"
3 = 1b
4 = 2a
5 = 2b,2b2

END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants