Web lists-archives.com

Re: Using g_utf8_collate() with gtk_disable_setlocale()

On 9 March 2017 at 17:44, Andreas Falkenhahn <andreas@xxxxxxxxxxxxxx> wrote:
> Is there any way to make g_utf8_collate() use the system's locale
> when using gtk_disable_setlocale()?

No, because you just told everything to not use the locale.

> In my application I need to use
> gtk_disable_setlocale() because having GTK call setlocale() has
> several implications which I'd like to avoid (e.g. strtod() suddenly
> expecting a comma instead of a point as a decimal separator).

You should be using `g_ascii_strtod()` if you need a
locale-independent version of `strtod()`, instead of disabling the

In general, disabling the locale is only meant for specific, limited
cases, like platforms with broken locales, or debugging, not as a "get
out of jail for free" card.


[@] ebassi [@gmail.com]
gtk-list mailing list