Re: Using g_utf8_collate() with gtk_disable_setlocale()
- From: Emmanuele Bassi <ebassi gmail com>
- To: Andreas Falkenhahn <andreas falkenhahn com>
- Cc: ML-gtk <gtk-list gnome org>
- Subject: Re: Using g_utf8_collate() with gtk_disable_setlocale()
- Date: Thu, 9 Mar 2017 18:20:09 +0000
On 9 March 2017 at 17:44, Andreas Falkenhahn <andreas falkenhahn com> 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]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]