locales

Andy Robinson andy at seventhstring.com
Sat Feb 6 16:38:03 UTC 2016


On 04/02/16 16:00, Andy Robinson wrote:
> With the old version 0.1 on Linux I found that calling GST functions
> would often change the locale, which was very irritating.
>
> With 1.2.4 on Linux and 1.6.3 on Windows and Mac, I find the locale no
> longer changes when I call a GST function - good!
>
> My question is, when did this happen? Is it true of all 1.x releases,
> that the locale will not get changed?

Ok I've found the answer in the Changelog for 1.2.4, so I guess 1.2.4 is 
the first version which doesn't mess with the locale:

2012-11-20 12:56:12 +0100  Sebastian Dröge 
<sebastian.droege at collabora.co.uk>
* gst/gst.c:
   gst: Don't set the locale in gst_init()
   The function init_pre() in gstreamer/gst/gst.c calls 
setlocale(LC_ALL, ""), which sets the locale to the values specified in 
the environment.  This is wrong for two reasons:
   1. It is absolutely not the task of a library to decide on the 
correct locale for a program.  Some programs change the locale for 
various (good or bad) reasons, and libraries should respect that.


Thanks for fixing this.

Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com


More information about the gstreamer-devel mailing list