mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
KeyboardMapper: Convert Utf-8 char in String to Utf-32 code point
Ensure that the Utf-8 encoded "mapping character" in String (from InputBox) gets converted to Utf-32 code point. Before, only the first byte of Utf-8 char sequence was used as a Utf-32 code point. That used to result in incorrect characters getting written in the keymap file for all the "non-ascii" characters used as the mapping character.
This commit is contained in:
parent
227aa8f2e4
commit
90d68d43ce
Notes:
sideshowbarker
2024-07-17 00:16:31 +09:00
Author: https://github.com/ronak69
Commit: 90d68d43ce
Pull-request: https://github.com/SerenityOS/serenity/pull/22915
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ void KeyboardMapperWidget::create_frame()
|
|||
if (value.is_empty())
|
||||
map[index] = '\0'; // Empty string
|
||||
else
|
||||
map[index] = value.bytes().at(0);
|
||||
map[index] = *value.code_points().begin();
|
||||
|
||||
window()->set_modified(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue