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

CSV.encoder fails on multiline string #22337

Closed
eptx opened this issue Sep 28, 2024 · 0 comments · Fixed by #22342
Closed

CSV.encoder fails on multiline string #22337

eptx opened this issue Sep 28, 2024 · 0 comments · Fixed by #22342
Assignees
Labels
Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: vlib Bugs/feature requests, that are related to the vlib.

Comments

@eptx
Copy link

eptx commented Sep 28, 2024

Describe the bug

See code example

Reproduction Steps


data := 'x,y
a,b,c'

mut parser := csv.new_reader(data)
for {
    items := parser.read() or { break }
    println(items)
}

//output
['x', 'y']
['a', 'b', '']

Expected Behavior

It should output
['x', 'y']
['a', 'b', 'c']

Current Behavior

['x', 'y']
['a', 'b', '']

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.7 d9a3a3a.1cac0c3

Environment details (OS name and version, etc.)

V full version: V 0.4.7 d9a3a3a.1cac0c3
OS: macos, macOS, 14.6.1, 23G93
Processor: 12 cpus, 64bit, little endian, Apple M2 Max

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@eptx eptx added the Bug This tag is applied to issues which reports bugs. label Sep 28, 2024
@felipensp felipensp self-assigned this Sep 28, 2024
@felipensp felipensp added the Unit: vlib Bugs/feature requests, that are related to the vlib. label Sep 28, 2024
@felipensp felipensp changed the title CSV.endcoder fails on multiline string CSV.encoder fails on multiline string Sep 28, 2024
@felipensp felipensp added Status: Confirmed This bug has been confirmed to be valid by a contributor. and removed Bug This tag is applied to issues which reports bugs. labels Sep 28, 2024
@huly-for-github huly-for-github bot reopened this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: vlib Bugs/feature requests, that are related to the vlib.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants