mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #752] InputRenderable rejects non-ASCII characters (accented letters, Unicode) #975
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#975
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hokimisu on GitHub (Feb 27, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/752
The
InputRenderableclass in@opentui/corerestricts text input to ASCII-only characters (codes 32-126), preventing users from typing any accented or non-ASCII characters such as Frenché,è,ê,à,ç,ù,ô,î, as well as characters from other languages (Germanü,ö,ä, Spanishñ, etc.).Steps to Reproduce
InputRenderable(e.g., a text input field)éorçRoot Cause
In
packages/core/index.js, thehandleKeyPressmethod ofInputRenderable(line ~5789) has this condition:The check
charCodeAt(0) <= 126limits input to the ASCII printable range only. Any character above code point 126 is rejected. For reference:az~éèçàüñSuggested Fix
Replace the upper bound check
<= 126with!== 127(to still exclude the DEL control character):This allows all printable Unicode characters while still filtering out control characters (< 32) and DEL (127).
Note:
TextareaRenderablealready uses a more permissive check that does not have this issue.Environment
@opentui/coreversion: 0.1.73@simonklee commented on GitHub (Feb 27, 2026):
Please update your OpenTUI version. InputRenderable was refactored. https://github.com/anomalyco/opentui/pull/539