[MPlayer-cvslog] r35961 - in trunk: Changelog input/input.c libvo/x11_common.c osdep/getch2.c o
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Feb 11 16:09:50 CET 2014
On 11 February 2014 11:07:22 CET, "Ingo Brückl" <ib at wupperonline.de> wrote:
>Reimar Döffinger wrote on Sun, 9 Feb 2014 13:26:11 +0100:
>
>> On 08.02.2014, at 18:06, Ingo Brückl <ib at wupperonline.de> wrote:
>
>>>> Author: reimar
>>>> Date: Thu Mar 14 20:59:35 2013
>>>> New Revision: 35961
>>>
>>>> Log:
>>>> Add support for binding any key in UTF-8 range.
>>>
>>>> X11 part is a bit hackish since we need to use
>>>> setlocale to get desired behaviour for XLookupString.
>>>
>>>> Modified: trunk/Changelog
>>>>
>=========================================================================
>>>> +++ trunk/Changelog Thu Mar 14 20:59:35 2013 (r35961)
>>>> @@ -13,6 +13,7 @@ MPlayer
>>>> better than -vo gl (it is in many ways worse).
>>>> * Fixes for DVB, teletext and closed-caption based subtitles.
>>>> * Support teletext and CC subtitles in WTV.
>>>> + * Support binding keys corresponding to non-ASCII characters.
>>>
>>> + * Support binding keys corresponding to non-Latin-1 characters.
>>>
>>>> Modified: trunk/libvo/x11_common.c
>>>>
>=========================================================================
>>>> +++ trunk/libvo/x11_common.c Thu Mar 14 20:59:35 2013 (r35961)
>>>> @@ -427,6 +428,9 @@ int vo_init(void)
>>>> return 1; // already called
>>>> }
>>>>
>>>> + // Required so that XLookupString returns UTF-8
>>>> + if (!setlocale(LC_CTYPE, "C.UTF-8") && !setlocale(LC_CTYPE,
>"en_US.utf8"))
>>>> + mp_msg(MSGT_VO, MSGL_WARN, "Could not find a UTF-8 locale,
>some keys will no be handled.\n");
>>>
>>> + mp_msg(MSGT_VO, MSGL_WARN, "Could not find a UTF-8 locale,
>non-Latin-1 keys will no be handled.\n");
>>>
>>> Reimar, would you mind these changes? "Some keys" sounds somehow
>randomly
>>> (and I was asking myself which of my keys might not be handled;
>answer:
>>> none won't be handled, all keys are fine).
>>>
>>> According to the Xlib manual, KeySym is mapped, if possible, to an
>ISO
>>> Latin-1 character, and the patch only takes effect beyond this
>range.
>
>> I don't think so, the error was reported for the french special c
>> character, so I believe that even certain Latin-1 characters are
>> affected, so that changed message would be misleading.
>
>Quite strange. Where was the error report?
I thought it was on the bug tracker, but can't find it.
>Without XRebindKeysym() (and I can't spot one in MPlayer sources),
>libX11's _XTranslateKeySym() transforms a Latin 1 U+0020..U+00FF symbol
>into c = symbol & 0xFF and places c in buffer[0].
>
>So I can't see why any Latin-1 character should be affected.
You're probably right, I think the issue there was that specifying the key binding wasn't working, which I believe was fixed by an earlier commit, so I think overall the Changelog is right.
What concerns the error message: some non-Latin 1 characters will work either way, like the cursor keys etc.
But I guess your message is still more user-friendly.
More information about the MPlayer-cvslog
mailing list