fixes #60 demo's: boxes: character set not supported

This commit is contained in:
Garrett D'Amore 2015-10-28 08:22:22 -07:00
parent f426ddb33c
commit d1cdd81c57
2 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,8 @@ func makebox(s tcell.Screen) {
} }
func main() { func main() {
tcell.SetEncodingFallback(tcell.EncodingFallbackASCII)
s, e := tcell.NewScreen() s, e := tcell.NewScreen()
if e != nil { if e != nil {
fmt.Fprintf(os.Stderr, "%v\n", e) fmt.Fprintf(os.Stderr, "%v\n", e)

View File

@ -132,5 +132,8 @@ func init() {
// We always support UTF-8 and ASCII. // We always support UTF-8 and ASCII.
encodings = make(map[string]encoding.Encoding) encodings = make(map[string]encoding.Encoding)
encodings["utf-8"] = gencoding.UTF8 encodings["utf-8"] = gencoding.UTF8
encodings["utf8"] = gencoding.UTF8
encodings["us-ascii"] = gencoding.ASCII encodings["us-ascii"] = gencoding.ASCII
encodings["ascii"] = gencoding.ASCII
encodings["iso646"] = gencoding.ASCII
} }