[MPlayer-cvslog] r32940 - trunk/gui/skin/skin.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Feb 22 18:52:24 CET 2011


On Tue, Feb 22, 2011 at 11:58:26AM +0100, Ingo Brückl wrote:
> Reimar Döffinger wrote Mon, 21 Feb 2011 19:16:14 +0100:
> 
> >> +   if (*p >= 'A' && *p <= 'Z') *p += ' ';
> 
> > += 'a' - 'A';
> > is easier to understand IMO.
> 
> Yes, I agree. But if it's for easy understanding what about *p = tolower(*p)
> then?

tolower depends on the locale setting.
While we cannot run MPlayer in anything but the C locale particularly
in the GUI code I'd avoid code that depends on that.
Note that I do not know if it would be correct for that code to depend
on the locale or not (would everything work correctly if here
tolower('I') != 'i' ?).
Also it does change the code, e.g. with tolower even with the C
locale to my knowledge Ö would become ö when in ISO-8891-1
which is currently not done while it would probably 'randomly'
mangle UTF-8 strings etc.


More information about the MPlayer-cvslog mailing list