From 2b72558527fd2f31274f665244ad84fe90a19bd5 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 22 Jan 2022 16:16:26 +0800 Subject: [PATCH] Use locale coding system to decode XIM preedit text * src/xfns.c (x_xim_text_to_utf8_unix): XIMs typically return text in the locale coding system, so use that instead. --- src/xfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xfns.c b/src/xfns.c index a1435d53513..7123198724a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3051,7 +3051,7 @@ x_xim_text_to_utf8_unix (XIMText *text, ptrdiff_t *length) } nbytes = strlen (text->string.multi_byte); - setup_coding_system (Qutf_8_unix, &coding); + setup_coding_system (Vlocale_coding_system, &coding); coding.mode |= (CODING_MODE_LAST_BLOCK | CODING_MODE_SAFE_ENCODING); coding.source = (const unsigned char *) text->string.multi_byte; -- 2.39.5