GNU bug report logs -
#10299
Emacs doesn't handle Unicode characters in keyboard layout on MS Windows
Previous Next
Full log
Message #32 received at 10299 <at> debbugs.gnu.org (full text, mbox):
On 15 December 2011 15:40, Jason Rumney <jasonr <at> gnu.org> wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Date: Wed, 14 Dec 2011 21:39:28 +0100
>>> From: Joakim Hårsman <joakim.harsman <at> gmail.com>
>>>
>>> However, Emacs doesn't seem to handle the case when the keyboard
>>> layout contains characters not available in the ANSI code page, and
>>> just prints a question mark character instead.
>>
>> Yes, Emacs on Windows uses the ANSI codepage to read the keyboard
>> input. Does it help to play with the value of keyboard-coding-system?
>
> It tries to use Unicode if the Windows input method is sending it. The
> problem here is that there is no standard for Windows input methods, so
> even the ones built into Windows act differently for different languages
> and for the same language across different versions of Windows.
>
> Some input methods will send WM_UNICHAR messages with the Unicode
> character, which can be intercepted before they are turned into question
> marks by Windows. These will just work with Emacs.
>
> Others will send character codes corresponding to the codepoints in the
> default Windows codepage for that language (regardless of your system
> codepage). These can be handled by changing keyboard-coding-system
> within Emacs.
>
> Others will not send anything useful unless your system codepage is set
> appropriately for the language being input.
>
> It sounds like this one may be in the third category.
Well, the custom keyboard layout works in all other programs I've
tried so Windows is certainly sending something useful to them.
However, I think IMEs use a slightly different, more complex method to
send input events. Emacs seems to handle IMEs better than custom
keyboard layouts, with an IME you can get ungarbled Unicode characters
into Emacs.
This bug report was last modified 12 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.