go.crypto/ssh/terminal: support Unicode entry.

Previously, terminal only supported ASCII characters. This change
alters some []byte to []rune so that the full range of Unicode is
supported. The only thing that doesn't appear to work correctly are
grapheme clusters as the code still assumes one rune per glyph. Still,
this change allows many more languages to work than did previously.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13704043
This commit is contained in:
Adam Langley
2013-09-13 14:33:00 -04:00
parent e62b2aead4
commit cb60f353cb
2 changed files with 50 additions and 36 deletions
+4
View File
@@ -137,6 +137,10 @@ var keyPressTests = []struct {
in: "ab\x1b[D\013\r",
line: "a",
},
{
in: "Ξεσκεπάζω\r",
line: "Ξεσκεπάζω",
},
}
func TestKeyPresses(t *testing.T) {