[GH-ISSUE #37] Document charsets / encodings support #30

Closed
opened 2026-03-04 01:01:15 +03:00 by kerem · 1 comment
Owner

Originally created by @jsamr on GitHub (Jan 19, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/37

Hi and thanks for your awesome work.
I haven't seen any information on the accepted charsets compatible with this library.
Could you perhaps add information on your README ?

For example

  • Are some UI elements using non-ASCII characters ?
  • Does it assumes the configured encoding is UTF-8 ?
  • What happens if the end-user has the $LANG variable set to another encoding like ISO-8859 or UCS-2 ?

Thank you again,

J

Originally created by @jsamr on GitHub (Jan 19, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/37 Hi and thanks for your awesome work. I haven't seen any information on the accepted [charsets](http://man7.org/linux/man-pages/man7/charsets.7.html) compatible with this library. Could you perhaps add information on your README ? For example - Are some UI elements using non-ASCII characters ? - Does it assumes the configured encoding is UTF-8 ? - What happens if the end-user has the `$LANG` variable set to another encoding like ISO-8859 or UCS-2 ? Thank you again, J
kerem closed this issue 2026-03-04 01:01:15 +03:00
Author
Owner

@rivo commented on GitHub (Jan 19, 2018):

Hi, tview is based entirely on https://github.com/gdamore/tcell. You may want to look there for more information about charsets. The tcell documentation says this:

If the environment is not Unicode by default, such as an ISO8859 based locale or GB18030, Tcell can convert input and outupt, so that your terminal can operate in whatever locale is most convenient, while the application program can just assume "everything is UTF-8". Reasonable defaults are used for updating characters to something suitable for display. Unicode box drawing characters will be converted to use the alternate character set of your terminal, if native conversions are not available. If no ACS is available, then some ASCII fallbacks will be used.

I'm using some UTF-8 box drawing characters (and an ellipsis character) which are listed here. To be honest, though, I haven't tested how these translate to other terminals that don't support them. If you can shed some light, that would be great.

<!-- gh-comment-id:359074982 --> @rivo commented on GitHub (Jan 19, 2018): Hi, `tview` is based entirely on https://github.com/gdamore/tcell. You may want to look there for more information about charsets. The [tcell documentation](https://godoc.org/github.com/gdamore/tcell) says this: > If the environment is not Unicode by default, such as an ISO8859 based locale or GB18030, Tcell can convert input and outupt, so that your terminal can operate in whatever locale is most convenient, while the application program can just assume "everything is UTF-8". Reasonable defaults are used for updating characters to something suitable for display. Unicode box drawing characters will be converted to use the alternate character set of your terminal, if native conversions are not available. If no ACS is available, then some ASCII fallbacks will be used. I'm using some UTF-8 box drawing characters (and an ellipsis character) which are listed [here](https://godoc.org/github.com/rivo/tview#pkg-constants). To be honest, though, I haven't tested how these translate to other terminals that don't support them. If you can shed some light, that would be great.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#30
No description provided.