Emoji input doesn't input anything #7762

Open
opened 2026-01-31 01:12:05 +00:00 by claunia · 0 comments
Owner

Originally created by @mbartlett21 on GitHub (Apr 28, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.815]
Windows Terminal version (if applicable): 

Any other software?

This is using Lua, edited to execute chcp 65001 > nul before reading any input.

Steps to reproduce

When entering a line into Lua, enter a unicode emoji.

Expected behavior

The emoji would be read as four utf-8 bytes: \xf0\x9f\x99\x82

Actual behavior

The line is only read up to the emoji (not including it).

Notes

When I tried this in cmd (also through MS Terminal), it entered correctly, resulting in
'😀' is not recognized as an internal or external command, operable program or batch file.

Lua uses fgets to read a line.

I tested _getch as another method and it had the same problem (It refused to read anything unless it was ASCII and not an emoji).

Originally created by @mbartlett21 on GitHub (Apr 28, 2020). Environment ======== ```none Windows build number: Microsoft Windows [Version 10.0.18363.815] Windows Terminal version (if applicable): Any other software? ``` This is using [Lua](https://github.com/lua/lua), edited to execute `chcp 65001 > nul` before reading any input. Steps to reproduce ============ When entering a line into Lua, enter a unicode emoji. Expected behavior ============ The emoji would be read as four utf-8 bytes: `\xf0\x9f\x99\x82` Actual behavior ========== The line is only read up to the emoji (not including it). Notes ==== When I tried this in `cmd` (also through MS Terminal), it entered correctly, resulting in `'😀' is not recognized as an internal or external command, operable program or batch file.` Lua uses `fgets` to read a line. I tested `_getch` as another method and it had the same problem (It refused to read anything unless it was ASCII and not an emoji).
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 01:12:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7762