[MPlayer-dev-eng] [PATCH] Fix dll loading with Turkish locales
D Richard Felker III
dalias at aerifal.cx
Wed Jan 19 19:26:21 CET 2005
On Wed, Jan 19, 2005 at 05:28:55PM +0100, Reimar Döffinger wrote:
> On Wed, Jan 19, 2005 at 02:57:15PM +0200, Ismail Donmez wrote:
> > In turkish locale toupper("i) != I and tolower("I") != i . This problem makes
> > mplayer crash when an external dll needs to be loaded for audio and/or video.
> > I tried to get a sensible backtrace but al I get was "??" lines. I suspect
> > crash happens inside the dll.
> > The solution:
> > Set LC_ALL to "C" before opening audio/video decoder so character conversions
> > doesn't use locale settings. This have no effect on !Turkish locales where
> > the above problem doesn't apply.
> Rejected. To fix this crash alone, changing loader/win32.c, line 5311 is
> Also this patch still won't make MPlayer work correctly,
> case-insensitive comparisons are needed all over the place, e.g. http
> requests and (in some places) option parsing.
> The only thing that comes close to a solution (which would be fixing
> how the language is represented on the computer) is to provide our own
> implementation of strcasecmp (same is true to sscanf etc., too).
> The own implementation may of course consist of a simple wrapper that
> just sets LC_ALL to "C"...
I have a much simpler patch proposal: remove setlocale() from
mplayer.c. Unless/until mplayer works around all this brokenness, it
should not be used. There are all sorts of issues with . versus , in
numbers, and many more I'm sure. What is locale even useful for?? Do
users really care if their local date format/decimal separator is
used??? IMO it's all nonsense.
More information about the MPlayer-dev-eng