aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/csv/reader.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2018-03-08 14:39:43 -0800
committerJoe Tsai <thebrokentoaster@gmail.com>2018-03-09 00:33:43 +0000
commit2cc15b18dbab600939147dfe4c58aa6b8f04586e (patch)
treee42511b0883e8b2dba026efd46e80fce4e16e6f3 /src/encoding/csv/reader.go
parent5d22cebb1272b3761860c5fa9ee82ceb3d94c628 (diff)
downloadgo-2cc15b18dbab600939147dfe4c58aa6b8f04586e.tar.xz
encoding/csv: disallow quote for use as Comma
'"' has special semantic meaning that conflicts with using it as Comma. Change-Id: Ife25ba43ca25dba2ea184c1bb7579a230d376059 Reviewed-on: https://go-review.googlesource.com/99696 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/csv/reader.go')
-rw-r--r--src/encoding/csv/reader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/csv/reader.go b/src/encoding/csv/reader.go
index 2efc7ad094..a2fd4c0970 100644
--- a/src/encoding/csv/reader.go
+++ b/src/encoding/csv/reader.go
@@ -91,7 +91,7 @@ var (
var errInvalidDelim = errors.New("csv: invalid field or comment delimiter")
func validDelim(r rune) bool {
- return r != 0 && r != '\r' && r != '\n' && utf8.ValidRune(r) && r != utf8.RuneError
+ return r != 0 && r != '"' && r != '\r' && r != '\n' && utf8.ValidRune(r) && r != utf8.RuneError
}
// A Reader reads records from a CSV-encoded file.