bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12392: emacs-gtk misinterprets floating-point numbers under certain


From: Achim Gratz
Subject: bug#12392: emacs-gtk misinterprets floating-point numbers under certain locales on openSUSE 12.2
Date: Sat, 22 Sep 2012 18:36:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Holger Arnold writes:
> May I cite: "Note, however, that changing the locale after GTK+ is 
> initialized 
> may produce inconsistent results and is not really supported."  This warning 
> is not related to this particular function, as gtk_set_locale() does nothing 
> more than calling setlocale(LC_ALL, "").  Emacs calls this function via 
> gtk_init().

That part is documented and it can be suppressed via
gtk_disable_setlocale() at the discretion of the application.  The
warning about inconsistent results is about locale-dependent things set
up in gtk_init() that would need to be re-run if the locale changes.

> Note that _any_ program having a localized user interface has to call 
> setlocale(LC_ALL, "") at the start to set the locale to the value specified 
> by 
> its environment.  gtk_init() simply does this for you.  If you don't like 
> that 
> behavior, you can initialize GTK without calling gtk_init() (but this 
> wouldn't 
> help with GStreamer).

Yes and that's a bug right there in GStreamer.  If the locale
environment is already set up, it has no business in querying the
initial environment again.

> As to whether calling setlocale(LC_ALL, "") in a library is a bug, what would 
> you expect a library that wants to provide localized messages to do?  
> Changing 
> the locale before and after each call?  This would be racy in a 
> multi-threaded 
> program.

An application may chose to never set up a locale and there should be a
way to tell libraries to respect that (I don't think there is a
foolproof way to check for whether a locale has already been set up by
the application).  Gtk has that, but GStreamer is missing or ignoring
it.  Plus it must be a development that happened in a version between
12.1 and 12.2.  Here's another one with the same or very similar
problem:

https://github.com/pavouk/lgi/issues/19

I don't know where the "gstreamer override file" can be found that he
talks about.  :-(


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds






reply via email to

[Prev in Thread] Current Thread [Next in Thread]