-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable broken KEYBD trap for multibyte characters
In UTF-8 locales, ksh breaks when a KEYBD trap is active, even a dummy no-op one like 'trap : KEYBD'. Entering multi-byte characters fails (the input is interrupted and a new prompt is displayed) and pasting content with multi-byte characters produces corrupted results. The cause is that the KEYBD trap code is not multibyte-ready. Unfortunately nobody yet understands the edit.c code well enough to implement a proper fix. Pending that, this commit implements a workaround that at least avoids breaking the shell. src/cmd/ksh93/edit/edit.c: ed_getchar(): - When a multi-byte locale is active, do not trigger the the KEYBD trap except for ASCII characters (1-127). Resolves: #307
- Loading branch information
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters