Re: Using g_utf8_collate() with gtk_disable_setlocale()

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

 



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
locale.

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.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux