mirror of https://github.com/gdamore/tcell.git
fixes #60 demo's: boxes: character set not supported
This commit is contained in:
parent
f426ddb33c
commit
d1cdd81c57
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue