emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switch the Windows port to using Unicode keyboard input


From: Eugen Anghel
Subject: Re: Switch the Windows port to using Unicode keyboard input
Date: Sun, 4 Oct 2009 17:30:01 +0300

2009/10/4 Eli Zaretskii <address@hidden>:
>> From: Eugen Anghel <address@hidden>
>> Date: Sun, 4 Oct 2009 16:39:51 +0300
>>
>> I couldn't type the 'ș' and 'ț' (u+0219 & u+021B) characters from a
>> Romanian keyboard layout, so I've tried to implement this item from
>> the TODO file:
>> ** Switch the Windows port to using Unicode keyboard input (maybe).
>
> Thanks.
>
>> I have attached a patch with the changes so far. It seems to be
>> working. Are there any tests I can perform, or some known corner-cases
>> I need to check?
>
> What would happen on Windows 9x under this patch?  We don't want to
> discontinue support for Windows 9x yet, since many users in the Third
> World are still using it.
>

Technically, there is the Microsoft Layer for Unicode, but I've never
used it, so I don't know how or if it works.
http://en.wikipedia.org/wiki/Microsoft_Layer_for_Unicode

I guess it's possible to load and use the W-functions at runtime, only
if available. From what I see, the same is done with AppendMenuW. To
be honest, I was expecting Win9x to not be supported anymore. Since it
is, I'll try to do it this way. Unfortunately, I don't have access to
a Win9x machine where I could test the changes.

Speaking of AppendMenuW:

  unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32,
"AppendMenuW");
...
      if (unicode_append_menu)
        title = ENCODE_UTF_8 (title);
      else if (STRING_MULTIBYTE (title))
        title = ENCODE_SYSTEM (title);

Is ENCODE_UTF_8(title) correct? Isn't AppendMenuW expecting an utf-16 string?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]