From d1cdd81c5765467470388d8e7b487fa8009f68bb Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 28 Oct 2015 08:22:22 -0700 Subject: [PATCH] fixes #60 demo's: boxes: character set not supported --- _demos/boxes.go | 2 ++ encoding.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/_demos/boxes.go b/_demos/boxes.go index a5fb32f..ee5e586 100644 --- a/_demos/boxes.go +++ b/_demos/boxes.go @@ -56,6 +56,8 @@ func makebox(s tcell.Screen) { } func main() { + + tcell.SetEncodingFallback(tcell.EncodingFallbackASCII) s, e := tcell.NewScreen() if e != nil { fmt.Fprintf(os.Stderr, "%v\n", e) diff --git a/encoding.go b/encoding.go index 11c753f..f4ce8e1 100644 --- a/encoding.go +++ b/encoding.go @@ -132,5 +132,8 @@ func init() { // We always support UTF-8 and ASCII. encodings = make(map[string]encoding.Encoding) encodings["utf-8"] = gencoding.UTF8 + encodings["utf8"] = gencoding.UTF8 encodings["us-ascii"] = gencoding.ASCII + encodings["ascii"] = gencoding.ASCII + encodings["iso646"] = gencoding.ASCII }