]> Cypherpunks repositories - gostls13.git/commit
strings: fix encoding of \u0080 in map
authorMartin Möhrmann <moehrmann@google.com>
Fri, 4 May 2018 04:54:18 +0000 (06:54 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 4 May 2018 05:37:45 +0000 (05:37 +0000)
commit8c62fc0ca3c96ecbd3a6e81546aa8c53e32ff500
tree4f312eb8a09a81c8c2e083d9425c6a12fd180dd5
parent98409a44d5e971f4ffd485dfb130a8521caa7355
strings: fix encoding of \u0080 in map

Fix encoding of PAD (U+0080) which has the same value as utf8.RuneSelf
being incorrectly encoded as \x80 in strings.Map due to using <= instead
of a < comparison operator to check one byte encodings for utf8.

Fixes #25242

Change-Id: Ib6c7d1f425a7ba81e431b6d64009e713d94ea3bc
Reviewed-on: https://go-review.googlesource.com/111286
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/strings/strings.go
src/strings/strings_test.go