[GH-ISSUE #1106] How to input emoji in tview.TextArea? #804

Closed
opened 2026-03-04 01:07:51 +03:00 by kerem · 2 comments
Owner

Originally created by @chehan01 on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1106

Now, when I input an emoji, the terminal looks like this:

Image

And the tview.TextView has the same problem:

Image

How to fix it?

Originally created by @chehan01 on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/rivo/tview/issues/1106 Now, when I input an emoji, the terminal looks like this: <img width="1113" height="626" alt="Image" src="https://github.com/user-attachments/assets/9a2e66da-1c5d-4884-bba4-18766a5f98dd" /> And the tview.TextView has the same problem: <img width="443" height="156" alt="Image" src="https://github.com/user-attachments/assets/6e7fc853-6d2b-45da-9552-a563f6c62aae" /> How to fix it?
kerem closed this issue 2026-03-04 01:07:51 +03:00
Author
Owner

@rivo commented on GitHub (Sep 1, 2025):

I actually don't know how to fix it. This appears to be a problem with keyboard input on Windows via tcell. The two codepoints for this emoji get replaced by two Unicode replacement characters. So the emoji codepoints never reach the tview application. I don't know why this happens. (I found this after a quick Google search but couldn't find a quick fix for this problem.)

Maybe you can write a short tcell application that shows the same behaviour. If it does, please post it as an issue to the tcell project.

<!-- gh-comment-id:3243105899 --> @rivo commented on GitHub (Sep 1, 2025): I actually don't know how to fix it. This appears to be a problem with keyboard input on Windows via [`tcell`](https://github.com/gdamore/tcell/). The two codepoints for this emoji get replaced by two [Unicode replacement characters](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character). So the emoji codepoints never reach the `tview` application. I don't know why this happens. (I found [this](https://stackoverflow.com/questions/388490/how-can-i-use-unicode-characters-on-the-windows-command-line) after a quick Google search but couldn't find a quick fix for this problem.) Maybe you can write a short `tcell` application that shows the same behaviour. If it does, please post it as an issue to the `tcell` project.
Author
Owner

@chehan01 commented on GitHub (Sep 2, 2025):

Well, thanks.

<!-- gh-comment-id:3243581653 --> @chehan01 commented on GitHub (Sep 2, 2025): Well, thanks.
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#804
No description provided.