[GH-ISSUE #9] Not support unicode #5

Closed
opened 2026-03-04 01:01:02 +03:00 by kerem · 5 comments
Owner

Originally created by @mylxsw on GitHub (Jan 11, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/9

Hello,

I found this library not support unicode currently, do you have any plan to add this feature?
Tcell has support to unicode.
when I input 中文支持,It juse show 中支

Originally created by @mylxsw on GitHub (Jan 11, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/9 Hello, I found this library not support unicode currently, do you have any plan to add this feature? Tcell has [support to unicode](https://github.com/gdamore/tcell/blob/master/_demos/unicode.go). when I input **中文支持**,It juse show **中支**
kerem closed this issue 2026-03-04 01:01:03 +03:00
Author
Owner

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

Hi,

Yes, I would like to support unicode. At first, reading this

Note that wide (East Asian full width) runes occupy two cells, and attempts to place character at next cell to the right will have undefined effects. Wide runes that are printed in the last column will be replaced with a single width space on output.

made me think there is no good way to deal with it. But the mattn/go-runewidth package appears to have all the functions that are needed.

I will get back to you when I have it.

<!-- gh-comment-id:356906426 --> @rivo commented on GitHub (Jan 11, 2018): Hi, Yes, I would like to support unicode. At first, reading [this](https://godoc.org/github.com/gdamore/tcell#Screen) > Note that wide (East Asian full width) runes occupy two cells, and attempts to place character at next cell to the right will have undefined effects. Wide runes that are printed in the last column will be replaced with a single width space on output. made me think there is no good way to deal with it. But the `mattn/go-runewidth` package appears to have all the functions that are needed. I will get back to you when I have it.
Author
Owner

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

I've added support for wide characters. Please have a look. If you still see issues with that, please let me know.

<!-- gh-comment-id:356955318 --> @rivo commented on GitHub (Jan 11, 2018): I've added support for wide characters. Please have a look. If you still see issues with that, please let me know.
Author
Owner

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

By the way, if you have a short code example with Chinese characters that you can send me, I'm happy to include it in the demos and the wiki.

<!-- gh-comment-id:356970115 --> @rivo commented on GitHub (Jan 11, 2018): By the way, if you have a short code example with Chinese characters that you can send me, I'm happy to include it in the demos and the wiki.
Author
Owner

@mylxsw commented on GitHub (Jan 12, 2018):

@rivo I've created a pull request with chinese characters demo #15

<!-- gh-comment-id:357131514 --> @mylxsw commented on GitHub (Jan 12, 2018): @rivo I've created a pull request with chinese characters demo #15
Author
Owner

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

Saw it. Thanks. It's also in the Wiki now.

<!-- gh-comment-id:357164624 --> @rivo commented on GitHub (Jan 12, 2018): Saw it. Thanks. It's also in the Wiki now.
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#5
No description provided.