Re: Locale definitions, dots and commas
- From: Carlos Pereira <jose carlos pereira ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: Re: Locale definitions, dots and commas
- Date: Wed, 12 Mar 2008 16:09:14 +0000
Tomas Carnecky wrote:
Carlos Pereira wrote:
Hi,
I received a message (see below) complaining about using dots instead
of commas in decimal numbers. What are the best solutions for this,
from the gtk point of view?
What happens is that in my French locale, the decimal >symbol is ','
not '.' !
Have a nice day, (and good luck with the bug).
> $ man 1p locale
> -> ENVIRONMENT VARIABLES
> This is the typical problem in engineering.
> you only puthis this method before gtk_main();
> gtk_disable_setlocale ();
Thanks for your answers, I realize this is not Gtk stuff,
but certainly affects every GTK app involving decimal numbers...
After setting in my .bashrc, for example (the same with portuguese,
russian, etc.):
LC_ALL=french; export LC_ALL
Everything automatically works in my GTK app, with commas instead of
dots, including exporting and importing files (involving for example the
Expat XML library).
However, a problem remains: my app is distributed with several hundreds
of example data files, ready to be imported. If these files are
dot-based, comma people cannot import them. If these files are
comma-based, dot people cannot import them... Unless I have two versions
for each file (which seems odd), or I supply a script to automatically
convert dot- to comma-based files...
If I use gtk_disable_setlocale, then dots are always used, but that does
not seem quite right... basically I am ignoring user's preference for
commas...
Is there a good solution for this? am I missing something?
What is the standard procedure in Gnome to handle this problem?
Thanks,
Carlos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]