[MPlayer-dev-eng] [PATCH] Allow gmplayer the use of non-UTF-8 filename encoding

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Dec 19 23:37:58 CET 2010


On Sun, Dec 19, 2010 at 10:30:09PM +0100, Ingo Brueckl wrote:
> Reimar Döffinger wrote on Sun, 19 Dec 2010 21:49:48 +0100:
> > Also, does restoring the old locale this way actually work?
> > LC_ALL modifies multiple locale settings, do they all get
> > restored correctly
> 
> Didn't you tell me that allowing gtk to call setlocale(LC_ALL, "") "breaks
> MPLayer left and right"? So the locale during runtime should be "C" anyway.
> (Perhaps setlocale(LC_ALL, "C") should be used to restore to make it clear?)

Well, I see two options, and I do not mind which:
1) properly restore the locale, but we should be confident that actually works
   for all cases
2) Just use setlocale(LC_ALL, "C"), then at least it looks like the hack it is.
I do wonder a bit what that function actually uses and if you really have to change
all LC_*...

> > Are you sure that gtk_clist_append makes a copy if the string?
> 
> I didn't change the use of the string for gtk_clist_append. It does with the
> string what it did prior to the patch.

You now pass a string to gtk_clist_append that you free _directly_ afterwards,
that wasn't the case before.


More information about the MPlayer-dev-eng mailing list