-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
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/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.
The trivial code path does not validate the UTF-8.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.