]> Cypherpunks repositories - gostls13.git/commit
strconv: fix CanBackquote for invalid UTF-8
authorVolker Dobler <dr.volker.dobler@gmail.com>
Tue, 15 Jul 2014 02:49:26 +0000 (19:49 -0700)
committerRob Pike <r@golang.org>
Tue, 15 Jul 2014 02:49:26 +0000 (19:49 -0700)
commitc0a824aad69f8eeb15868675c47d3ceb16277576
tree1b7aacf81b61e351650201df27733bd5a67ecbff
parentdeae10e0384c3224662946bc33e3a5badff782c6
strconv: fix CanBackquote for invalid UTF-8

Make CanBackquote(invalid UTF-8) return false.

Also add two test which show that CanBackquote reports
true for strings containing a BOM.

Fixes #7572.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/111780045
src/pkg/strconv/quote.go
src/pkg/strconv/quote_test.go