You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
strconv.Unquote with a quoted string containing an invalid UTF-8 byte sequence and either an escape sequence or not: https://play.golang.org/p/VZUxFxt7gh9
What did you expect to see?
The same encoding of the invalid UTF-8 regardless of whether the string contains an escape sequence (probably a reencoding of RuneError in both cases), or documentation explaining there's a difference.
What did you see instead?
If the string does not contain an escape sequence, the invalid UTF-8 sequence is preserved.
If the string contains an escape sequence, the invalid UTF-8 sequence reencodes RuneError.
What version of Go are you using (
go version
)?Playground.
What did you do?
strconv.Unquote
with a quoted string containing an invalid UTF-8 byte sequence and either an escape sequence or not: https://play.golang.org/p/VZUxFxt7gh9What did you expect to see?
The same encoding of the invalid UTF-8 regardless of whether the string contains an escape sequence (probably a reencoding of RuneError in both cases), or documentation explaining there's a difference.
What did you see instead?
If the string does not contain an escape sequence, the invalid UTF-8 sequence is preserved.
If the string contains an escape sequence, the invalid UTF-8 sequence reencodes RuneError.
The trivial code path does not validate the UTF-8.
The text was updated successfully, but these errors were encountered: