Disabling localisation for an app
- From: "Søren Hauberg" <hauberg gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Disabling localisation for an app
- Date: Thu, 16 Oct 2008 14:21:08 +0200
Hi,
I'm working on a GUI in a fairly large project, that (amongst other
things) write numeric data to a file that gnuplot will read. What this
boils down to is that I need
printf ("%f", 1.7);
to give me "1.70000". However, if I include
Gtk::Main kit(argc, argv);
in my application, the formating of numbers begin to depend on the
value of the $LANG environment variable. Specifically, if I set
LANG=da_DK.UTF-8 (default on my system), then the above-mentioned
printf statement gives "1,70000" (with a comma instead of a dot). How
can I (from within my application) enforce that this doesn't happen?
Thanks,
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]