[MPlayer-dev-eng] locale in GUI
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Mar 12 20:01:34 CET 2013
On Mon, Mar 11, 2013 at 11:13:44AM +0100, Reimar Döffinger wrote:
> "Ingo Brückl" <ib at wupperonline.de> wrote:
> >In short: If you have UTF-8 encoding, don't set the GLib environment
> >variables - everything will work just fine. Without UTF-8 encoding,
> >explicitly tell GLib by G_FILENAME_ENCODING which encoding you are
> >using.
> >Don't use @locale or G_BROKEN_FILENAMES.
>
> The point of my suggestion is to make it work without such arbitrary rules.
> The from_utf8 function cannot work on a system that mixes utf8 and Latin1 file names, while the to_utf8 can work just fine. Thus avoiding the former (which for us should not be a big problem) makes the code more robust.
So, I was vague because I didn't have time to look at the
documentation.
My suggestion is to use e.g. gtk_clist_set_row_data to
store the original string we passed into the to_utf8
function.
Then instead of using the from_utf8 functions with its
issue we can use gtk_clist_get_row_data, which should
make the code work even for the strangest cases.
I am sure I missed some details, but so far this looks
like very little additional code for making it a whole
lot more reliable.
More information about the MPlayer-dev-eng
mailing list