encoding/csv: non-UTF8 sequences are (unnecessarily) mangled when writing #24298
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Go 1.10
What operating system and processor architecture are you using (
go env
)?Linux and OSX (not that it matters).
What did you do?
What did you see instead?
I'll paste my post from #16791 instead of answering the above questions separately. This issue was fixed for
csv.Reader
in https://golang.org/cl/72150. Thanks go to @dsnet. The issue number was #19410.The problem is, however, still present for
csv.Writer
. Specifically for the writer, in csv/writer.go:The call to
w.w.WriteRune(r1)
mangles the character.What did you expect to see?
I expect it to not mangle my bytes if they don't contain special characters. Namely the delimiter (usually a comma), a newline (or carriage return) and double quotes. In my specific case, those characters are not present in the field that gets altered.
The text was updated successfully, but these errors were encountered: