Re: Disabling localisation for an app
- From: "Søren Hauberg" <hauberg gmail com>
- To: "klaus triendl" <klaus triendl eu>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Disabling localisation for an app
- Date: Thu, 16 Oct 2008 22:07:44 +0200
2008/10/16 klaus triendl <klaus triendl eu>:
> Søren Hauberg schrieb:
>> Thanks. I didn't know the 'setlocale' function, which was the one I
>> needed. I've just added a 'setlocale (LC_ALL, "C");' to my code, as I
>> don't want any locale changes anywhere in the application.
>
> Beware, c++ functionality like iostreams uses its own locale.
> So you need to call additionally std::locale::global("C") to change the
> c++ locale to "C" on a global scale.
Thanks for the heads up -- I'm sure that one probably have confused me
at some point in the future. For the record, it seems
std::locale::global expects a std::locale and not a string, so the
extra needed line is 'std::locale::global (std::locale ("C"));'
Thanks,
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]