1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-24 06:25:03 -05:00

Decode UTF-8 in pre-edit text

This is a pre-requisite to rendering it somehow.
This commit is contained in:
Ben Harris 2025-03-30 15:05:31 +01:00
parent 194ca31cc3
commit 35caff4048

View File

@ -8114,5 +8114,15 @@ void term_notify_window_size_pixels(Terminal *term, int x, int y)
*/ */
void term_set_preedit_text(Terminal *term, char *preedit_text) void term_set_preedit_text(Terminal *term, char *preedit_text)
{ {
debug("Pre-edit: %s\n", preedit_text); BinarySource src[1];
if (preedit_text != NULL) {
debug("Pre-edit:");
BinarySource_BARE_INIT(src, preedit_text, strlen(preedit_text));
while (get_avail(src))
debug(" U+%04X", decode_utf8(src, NULL));
debug("\n");
} else {
debug("Pre-edit finished\n");
}
} }