forked from DFHack/dfhack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multibyte character handling to posix console
I noticed that multibyte characters can mess up the console state variables. I decided to add a minimal multibyte support to make sure the input only collects complete valid multibyte characters in case user enters them to console. This change assumes that UTF-32 has one to one mapping between printed characters and char32 indexes. But I remember reading there is a few rare corner cases with accents where character might require multiple 4byte characters too. But this patch at least changes correct handling from about 100 characters to 99% of unicode characters.
- Loading branch information
Showing
1 changed file
with
67 additions
and
19 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