[vlc-devel] Checking for __STDC_ISO_10646__ in Qt4 module

Rémi Denis-Courmont remi at remlab.net
Sat Nov 6 12:14:18 CET 2010

Le samedi 6 novembre 2010 12:51:40 Steinar H. Gunderson, vous avez écrit :
> On Wed, Nov 03, 2010 at 10:36:50PM +0200, Juho Vähä-Herttua wrote:
> > This means that towlower is only called for qtk values smaller or equal
> > to 255.
> This is completely broken. If you want to lower-case a character, call
> tolower() and don't try to second-guess it. If you want to lower-case a
> _string_ it becomes a lot more complex, depending on how many Unicode
> weirdities you want to support.

The problem here is to map Qt4 keys to LibVLC keys. Qt4 refers to alphabetic 
keys with their ISO-8859-1 (or Unicode) upper-case code point, whereas LibVLC 
refers to them with their lower-case.

Changing the LibVLC convention to that of Qt4 would not solve the problem. X11 
also uses the lower-case convention as LibVLC does. Hence, we'd only move the 
problem from the Qt4 plugin to the XCB/window plugin.

So we need to map the upper-case characters to lower-case. As far as only 
Latin-1 is concerned, a static mapping might actually be better than 
towlower() - I was just being lazy when I wrote that code. Afterall, there is 
no reason why the key mapping would work or not work depending on the systel 

Rémi Denis-Courmont

More information about the vlc-devel mailing list