keyman
keyman copied to clipboard
bug(core): ldml_processor needs to handle utf-32 items in context 🙀
ldml_processor is likely to slice UTF-32 codepoints into surrogate pairs, such as the character "🙀"
const std::u16string str = vkeys.lookup(vk, modifier_state);
…
for(size_t i=0; i<str.length(); i++) {
// TODO-LDML: needs to be per UTF-32 char? Seems this would push surrogates.
state->context().push_character(str[i]);
state->actions().push_character(str[i]);
}
This should push one utf-32 character, not two surrogate pairs.
Context: found during #7234
#5015