Skip to content

encoding/csv: empty strings converted to "\"\"" by Write() and WriteAll() #7586

Closed
@gabrieldain

Description

@gabrieldain
What does 'go version' print?
go version go1.2.1 linux/amd64

What steps reproduce the problem?
Writing a []string or [][]string which include empty strings ("") with
csv.Write() and csv.WriteAll()

http://play.golang.org/p/h7dZPYzaSa

What happened?
"" was written as "\"\"", thus output was:
a,b,c
1,"",3

What should have happened instead?
There should be an option to enable behaviour such that the ouput is:
a,b,c
1,,3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions