summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-19 13:27:03 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-19 13:27:03 +0800
commit5b90b05e428c26e91b1409356a41d2c1dd654b44 (patch)
tree4c26e4a5faded6690a3656b186096c89f6d489bc /src/gtkutil.c
parent7829f1b5e698267c2baf37327fd393124f23c0ea (diff)
downloademacs-5b90b05e428c26e91b1409356a41d2c1dd654b44.tar.gz
Always decode GTK input method text as utf-8-unix
* src/gtkutil.c (xg_im_context_commit): Use `utf-8-unix' as coding system for text.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index bed983c77e3..27aa28b8902 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -6099,6 +6099,10 @@ xg_im_context_commit (GtkIMContext *imc, gchar *str,
EVENT_INIT (ie);
ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
ie.arg = build_unibyte_string (str);
+
+ Fput_text_property (make_fixnum (0), make_fixnum (strlen (str)),
+ Qcoding, Qutf_8_unix, ie.arg);
+
XSETFRAME (ie.frame_or_window, f);
ie.modifiers = 0;
ie.timestamp = 0;