{"action":"created","issue":{"url":"https://api.github.com/repos/gdamore/tcell/issues/17","labels_url":"https://api.github.com/repos/gdamore/tcell/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/gdamore/tcell/issues/17/comments","events_url":"https://api.github.com/repos/gdamore/tcell/issues/17/events","html_url":"https://github.com/gdamore/tcell/issues/17","id":109695532,"number":17,"title":"Support UTF-8 to 8-bit codes","user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-04T18:34:06Z","updated_at":"2015-10-05T03:06:57Z","closed_at":null,"body":"Some terminals (many) have only support for one or more 8-bit languages.  For example, Latin1 (8859-1) is very common.\r\n\r\nWe could look at $LANG (or LC_CTYPE or somesuch) and make a decision to convert our output to whatever form is appropriate for the given locale.\r\n\r\nBonus points: If we have #15 done, we could also check for support for certain special characters like pi, the UK pound sterling, etc. and translate those using ACS characters.  Its unclear at this time if that's actually worthwhile."},"comment":{"url":"https://api.github.com/repos/gdamore/tcell/issues/comments/145418823","html_url":"https://github.com/gdamore/tcell/issues/17#issuecomment-145418823","issue_url":"https://api.github.com/repos/gdamore/tcell/issues/17","id":145418823,"user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T03:06:57Z","updated_at":"2015-10-05T03:06:57Z","body":"We kind of have done this for #15, and we understand UTF-8 vs. ASCII vs. everything else, but to implement true support for e.g. ISO88591-15, we need to parse/grok the various encodings.  This means importing a rather large set of encodings to cope with all the differences. \r\n\r\nThe sad thing is, the encodings are *huge*.. especially some of the east asian encodings.  Rather than burden tcell with all of this, probably what we ought to do is offer a stock registry, where application developers can register an encoding.Encoding (from golang.org/x/text/encoding) along with a name to be used, and probably some list of aliases.  It will then be up to application developers to register the encodings that they care about.\r\n\r\nWe could probably build a \"stock\" package that uses all of them (taken from encoding/charmap, the traditional and simplified Chinese, Japanese, and Korean packages.)  Importing that package would create huge binaries, but that's what it takes to support ~all character sets.\r\n\r\nThis , btw, is the poster child for why we need dynamic linking in modern systems.\r\n"}}