]> Cypherpunks repositories - gostls13.git/commit
encoding/csv: restore Go 1.9 quoted \r\n handling in Reader
authorRuss Cox <rsc@golang.org>
Thu, 16 Nov 2017 15:29:50 +0000 (10:29 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 16 Nov 2017 16:29:37 +0000 (16:29 +0000)
commit1d47a145913f76f64414bbbc14bff3c95450535e
tree0444d95ec60f84cb4410590b1e06712ca99ac78a
parent918b98ca707e36ec84c0494b884ff0a02c9121c2
encoding/csv: restore Go 1.9 quoted \r\n handling in Reader

CL 52810 changed Reader to interpret a quoted \r\n as a raw \r\n
when reading fields. This seems likely to break existing users, and
discussion on both #21201 (the original issue that triggered the change)
and #22746 (discussing whether to revert the change) failed to identify
a single motivating example for this change. To avoid breaking existing
users for no clear reason, revert the change.

The Reader has been rewritten in the interim so this is not a git revert
but instead and adjustment (and slight simplification) of the new Reader.

Fixes #22746.

Change-Id: Ie857b2f4b1359a207d085b6d3c3a6d440a997d12
Reviewed-on: https://go-review.googlesource.com/78295
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/encoding/csv/reader.go
src/encoding/csv/reader_test.go
src/encoding/csv/writer.go