Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strconv: CanBackquote(invalid UTF-8) should be false #7572

Closed
robpike opened this issue Mar 18, 2014 · 3 comments
Closed

strconv: CanBackquote(invalid UTF-8) should be false #7572

robpike opened this issue Mar 18, 2014 · 3 comments
Milestone

Comments

@robpike
Copy link
Contributor

robpike commented Mar 18, 2014

The comment says it guarantees the string can be represented, but there is an argument
that bad UTF-8 will surprise someone who backquotes the string and finds it contains
illegal encodings.

For discussion.

See also issue #7565.
@rsc
Copy link
Contributor

rsc commented May 21, 2014

Comment 1:

I agree: CanBackquote should return false for strings containing invalid UTF-8.

Labels changed: added release-go1.4.

Status changed to Accepted.

@gopherbot
Copy link

Comment 3:

CL https://golang.org/cl/111780045 mentions this issue.

@robpike
Copy link
Contributor Author

robpike commented Jul 15, 2014

Comment 4:

This issue was closed by revision c0a824a.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Make CanBackquote(invalid UTF-8) return false.

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

Fixes golang#7572.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/111780045
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Make CanBackquote(invalid UTF-8) return false.

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

Fixes golang#7572.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/111780045
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants