go/src/encoding
Joe Tsai e7fed7fa35 encoding/csv: forbid certain Comma and Comment runes
The record delimiter (not configurable by user) is "\r\n" or "\n".
It is insensible for the user to set Comma or Comment delimiters
to be some character that conflicts with the record delimiter.
Furthermore, it is insensible for Comma or Comment to be the same rune.
Allowing this leaks implementation details to the user in regards to
the evaluation order of which rune is checked for first.

Fixes #22404

Change-Id: I31e86abc9b3a8fb4584e090477795587740970ae
Reviewed-on: https://go-review.googlesource.com/72793
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-25 01:43:46 +00:00
..
ascii85 encoding/ascii85: make bigtest big again 2017-06-23 14:28:30 +00:00
asn1 encoding/asn1: don't encode strings with '*' as PrintableString. 2017-10-09 19:28:47 +00:00
base32 encoding/base32: improve performance in common case 2017-08-14 18:51:14 +00:00
base64 encoding/base64: optimize DecodeString 2017-10-09 15:39:51 +00:00
binary encoding/binary: add example for Read multi 2017-08-12 01:17:13 +00:00
csv encoding/csv: forbid certain Comma and Comment runes 2017-10-25 01:43:46 +00:00
gob encoding/gob: fix a typo in the package documentation 2017-10-08 18:11:32 +00:00
hex encoding/hex: add NewEncoder, NewDecoder 2017-10-20 23:47:07 +00:00
json encoding/json: use Deprecated markers 2017-10-11 22:09:22 +00:00
pem all: prefer bytes.IndexByte over bytes.Index 2017-09-27 01:09:13 +00:00
xml all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
encoding.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00