From 89be24615416e27a9b1137bfa1812d628d639bd9 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Thu, 7 Aug 2008 15:58:58 +0000 Subject: [PATCH] Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822). Original commit message from CVS: Patch by: Frederic Crozat * ext/alsa/gstalsaplugin.c: (plugin_init): * ext/cdparanoia/gstcdparanoiasrc.c: (plugin_init): * ext/gnomevfs/gstgnomevfs.c: (plugin_init): * ext/ogg/gstoggdemux.c: (gst_ogg_demux_plugin_init): * gst-libs/gst/audio/gstbaseaudiosrc.c: (_do_init): * gst-libs/gst/pbutils/pbutils.c: (gst_pb_utils_init): * gst-libs/gst/tag/tags.c: (gst_tag_register_tags_internal): * gst/playback/gstdecodebin.c: (plugin_init): * gst/playback/gstdecodebin2.c: (gst_decode_bin_plugin_init): * gst/playback/gstplayback.c: (plugin_init): * gst/playback/gstqueue2.c: (plugin_init): * gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_plugin_init): * sys/v4l/gstv4l.c: (plugin_init): Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822). --- ChangeLog | 20 ++++++++++++++++++++ ext/alsa/gstalsaplugin.c | 1 + ext/cdparanoia/gstcdparanoiasrc.c | 1 + ext/gnomevfs/gstgnomevfs.c | 1 + ext/ogg/gstoggdemux.c | 1 + gst-libs/gst/audio/gstbaseaudiosrc.c | 1 + gst-libs/gst/pbutils/pbutils.c | 1 + gst-libs/gst/tag/tags.c | 1 + gst/playback/gstdecodebin.c | 1 + gst/playback/gstdecodebin2.c | 1 + gst/playback/gstplayback.c | 1 + gst/playback/gstqueue2.c | 1 + gst/playback/gsturidecodebin.c | 1 + sys/v4l/gstv4l.c | 1 + 14 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index b43937a..a4dc02c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2008-08-07 Tim-Philipp Müller + + Patch by: Frederic Crozat + + * ext/alsa/gstalsaplugin.c: (plugin_init): + * ext/cdparanoia/gstcdparanoiasrc.c: (plugin_init): + * ext/gnomevfs/gstgnomevfs.c: (plugin_init): + * ext/ogg/gstoggdemux.c: (gst_ogg_demux_plugin_init): + * gst-libs/gst/audio/gstbaseaudiosrc.c: (_do_init): + * gst-libs/gst/pbutils/pbutils.c: (gst_pb_utils_init): + * gst-libs/gst/tag/tags.c: (gst_tag_register_tags_internal): + * gst/playback/gstdecodebin.c: (plugin_init): + * gst/playback/gstdecodebin2.c: (gst_decode_bin_plugin_init): + * gst/playback/gstplayback.c: (plugin_init): + * gst/playback/gstqueue2.c: (plugin_init): + * gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_plugin_init): + * sys/v4l/gstv4l.c: (plugin_init): + Make sure gettext returns translations in UTF-8 encoding rather + than in the current locale encoding (#546822). + 2008-08-06 Stefan Kost * gst-libs/gst/pbutils/descriptions.c: diff --git a/ext/alsa/gstalsaplugin.c b/ext/alsa/gstalsaplugin.c index 87a6aa5..38f16e2 100644 --- a/ext/alsa/gstalsaplugin.c +++ b/ext/alsa/gstalsaplugin.c @@ -74,6 +74,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif err = snd_lib_error_set_handler (gst_alsa_error_wrapper); diff --git a/ext/cdparanoia/gstcdparanoiasrc.c b/ext/cdparanoia/gstcdparanoiasrc.c index 9a7ec30..fc755f7 100644 --- a/ext/cdparanoia/gstcdparanoiasrc.c +++ b/ext/cdparanoia/gstcdparanoiasrc.c @@ -493,6 +493,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif diff --git a/ext/gnomevfs/gstgnomevfs.c b/ext/gnomevfs/gstgnomevfs.c index a9792c7..2647e0f 100644 --- a/ext/gnomevfs/gstgnomevfs.c +++ b/ext/gnomevfs/gstgnomevfs.c @@ -127,6 +127,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); */ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return TRUE; diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 57ea9b1..bb059e8 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -3279,6 +3279,7 @@ gst_ogg_demux_plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif return gst_element_register (plugin, "oggdemux", GST_RANK_PRIMARY, diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c index f040e22..93c6e9d 100644 --- a/gst-libs/gst/audio/gstbaseaudiosrc.c +++ b/gst-libs/gst/audio/gstbaseaudiosrc.c @@ -113,6 +113,7 @@ _do_init (GType type) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ } diff --git a/gst-libs/gst/pbutils/pbutils.c b/gst-libs/gst/pbutils/pbutils.c index cdccabe..8accb8d 100644 --- a/gst-libs/gst/pbutils/pbutils.c +++ b/gst-libs/gst/pbutils/pbutils.c @@ -101,6 +101,7 @@ gst_pb_utils_init (void) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif inited = TRUE; diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index d145f6e..0afbb6b 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -51,6 +51,7 @@ gst_tag_register_tags_internal (gpointer unused) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* musicbrainz tags */ diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 94e64bc..cdf5542 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -1935,6 +1935,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return gst_element_register (plugin, "decodebin", GST_RANK_NONE, diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 17b1b51..0aa5c46 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2420,6 +2420,7 @@ gst_decode_bin_plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return gst_element_register (plugin, "decodebin2", GST_RANK_NONE, diff --git a/gst/playback/gstplayback.c b/gst/playback/gstplayback.c index 88e686f..aa98edb 100644 --- a/gst/playback/gstplayback.c +++ b/gst/playback/gstplayback.c @@ -44,6 +44,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ /* ref class from a thread-safe context to work around missing bit of diff --git a/gst/playback/gstqueue2.c b/gst/playback/gstqueue2.c index 333571a..d9550d0 100644 --- a/gst/playback/gstqueue2.c +++ b/gst/playback/gstqueue2.c @@ -2063,6 +2063,7 @@ plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return gst_element_register (plugin, "queue2", GST_RANK_NONE, GST_TYPE_QUEUE); diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 4c2374a..2b59454 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -1796,6 +1796,7 @@ gst_uri_decode_bin_plugin_init (GstPlugin * plugin) GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return gst_element_register (plugin, "uridecodebin", GST_RANK_NONE, diff --git a/sys/v4l/gstv4l.c b/sys/v4l/gstv4l.c index ab45936..6fe09cf 100644 --- a/sys/v4l/gstv4l.c +++ b/sys/v4l/gstv4l.c @@ -53,6 +53,7 @@ plugin_init (GstPlugin * plugin) #ifdef ENABLE_NLS setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ return TRUE; -- 2.7.4