GNOME Bugzilla – Bug 702425
ges-launch: make it portable to all locales.
Last modified: 2013-07-01 08:08:42 UTC
Created attachment 247001 [details] [review] ges-launch: make it portable to all locales. Call setlocale (LC_ALL, "") as per setlocale man page to make ges-launch portable to all locales (instead of default "C" one). Fixes g_option_context_parse on: $ ges-launch-1.0 --verbose -r -q /home/prahal/Vidéos/Test3.xges -o file:///home/prahal/Test3.mpeg Error initializing: Invalid byte sequence in conversion input The accentuated character in "Vidéos" the french xdg user directory for "Videos" is what is choked upon.
Isn't this also necessary for gst-launch and friends then?
I bet ges-launch is specific in that it does not call gettext . A comment in gettext source code give a hint but no definitive answer: http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/intl/localename.c#n2667 that is that gettext uses setlocale to get the locale value . Then on system where gettext would not find setlocale or setlocale with null argument support adding setlocale(LC_ALL, "") would be moot. To sum up : ges-launch as non getttextized is the only affected one. Adding setlocale to all the programs before gettext calls would be cleaner but stuff for another less severe bug report.
But neither gst-launch nor ges-launch call gettext. What's the real difference between both in this regard?
By the way, I managed to get the backtrace: (gdb) bt
+ Trace 232110
bugzilla folded too much into the previous backtrace: after the first backtrace I wrote that (could be seen in the source of the previous trace): which confirm the issue is with setlocale. About gettext. Indeed gettext-runtime is not called , only glibc gettext implementation. I shinted to much. About other gstreamer tools: only the arguments parsed via g_option_context_parse are breaking (the pipeline parser does not). Thus stressing gst-launch-1.0 via the only paramaters I found where oe could have accentuated characters (say a local plugin directory in a home subdirectory with a non ascii character in its name) i can reproduce: Breakpoint 2, g_set_error_literal (err=0x7fffffffbfc8, domain=51, code=1, message=0x7ffff73e6ae0 "Invalid byte sequence in conversion input") at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gerror.c:592 592 if (err == NULL) (gdb) bt
+ Trace 232111
I see, thanks for all these explanations!
Can you open other bugs with patches for gst-inspect, etc? commit 6a187e09ddd1de1941cbedec58ecb32ef9752ae1 Author: Alban Browaeys <prahal@yahoo.com> Date: Mon Jun 17 07:55:54 2013 +0200 ges-launch: make it portable to all locales. Call setlocale (LC_ALL, "") as per setlocale man page to make ges-launch portable to all locales (instead of default "C" one). Fixes g_option_context_parse on: $ ges-launch-1.0 --verbose -r -q /home/prahal/Vidéos/Test3.xges -o file:///home/prahal/Test3.mpeg Error initializing: Invalid byte sequence in conversion input The accentuated character in "Vidéos" the french xdg user directory for "Videos" is what is choked upon. https://bugzilla.gnome.org/show_bug.cgi?id=702425