Subject: Re: bug#19416: 25.0.50; enhancement of xterm mouse tracking: draging the mouse now generates mouse-movement events

From: Stefan Monnier <[email-masked]>
Date: Wed, 07 Jan 2015 17:46:17 -0500

> Yes, thats perfectly fine with me.
> I tried the following, but wasn't successfull:

> (defun read-utf8-char (&optional prompt inherit-input-method seconds)
>   "..."
>   (let ((tmp (keyboard-coding-system)))
>     (set-keyboard-coding-system 'utf-8)
>     (prog1 (read-char prompt inherit-input-method seconds)
>       (set-keyboard-coding-system tmp))))

> (insert (read-utf8-char))

The nil value of inherit-input-method prevents the keyboard decoding.
Try

(defun read-utf8-char (&optional prompt seconds)
  "..."
  (let ((tmp (keyboard-coding-system)))
    (set-keyboard-coding-system 'utf-8)
    (prog1 (read-event prompt t seconds)
      (set-keyboard-coding-system tmp))))

-- Stefan