Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: What you need to do indeed: 1. use locale-dependent formatting in the UI (both for input and output) 2. use locale-INDEPENDENT formatting when you read and save your data files. So you are saying that interfaces should use dots, commas, whatever is locally defined, but

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
Hi: If I follow Martin's suggestion, inserting gtk_disable_setlocale () before gtk_init (), everything is consistent and works fine, XML importing/exporting, GTK interfaces, etc. I just tested it. Unfortunately this means always using dot-based decimals. I always use dots myself, so this

Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote: I am building an intermediate unit system for engineeres in Gobject and i hope publish this library soon. With this system you always work in lineal measures in meters (double), and you can input others (inches, centimeters) input system - intermediate system

Re: Locale definitions, dots and commas

2008-03-13 Thread Andrew W. Nosenko
On Thu, Mar 13, 2008 at 5:12 PM, Carlos Pereira [EMAIL PROTECTED] wrote: Andrew W. Nosenko wrote: What you need to do indeed: 1. use locale-dependent formatting in the UI (both for input and output) 2. use locale-INDEPENDENT formatting when you read and save your data files. So you

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
[EMAIL PROTECTED] escribió: On Thu, 2008-03-13 at 15:48 +, Dave Howorth wrote: Martin (OpenGeoMap) wrote: I am building an intermediate unit system for engineeres in Gobject and i hope publish this library soon. With this system you always work in lineal measures in meters

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
/(\d+\.?\*)(\s*m)/ If you have 22.000 m in PERL you have $1=22.000 and $2=m sorry it was wrong: /(\d+\.?\d*)(\s*m)/ :-[ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote: Yes 22 m is the same as 22.000 m No, they are not the same. The second one says that something is known to within a mm. The first does not. PERL Regular expresions are great in C also, but better in perl and Ruby 8-) To learn a little about regular expresion you

Re: Locale definitions, dots and commas

2008-03-13 Thread wallace . owen
On Thu, 2008-03-13 at 16:46 +, Dave Howorth wrote: Martin (OpenGeoMap) wrote: Yes 22 m is the same as 22.000 m No, they are not the same. The second one says that something is known to within a mm. The first does not. PERL Regular expresions are great in C also, but better in perl

Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: On Thu, Mar 13, 2008 at 5:12 PM, Carlos Pereira [EMAIL PROTECTED] wrote: Andrew W. Nosenko wrote: What you need to do indeed: 1. use locale-dependent formatting in the UI (both for input and output) 2. use locale-INDEPENDENT formatting when you read and

Re: Locale definitions, dots and commas

2008-03-13 Thread Ernie Wright
[EMAIL PROTECTED] wrote: Dave Howorth wrote: Martin (OpenGeoMap) wrote: you can input in a entry for example (22m, 22 m, 220cm,...) and internally you have a double always in meters. How do you deal with precision? 22 m is not the same as 22.000 m Bad example. 22 can be expressed

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
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

Re: Locale definitions, dots and commas

2008-03-12 Thread Andrew W. Nosenko
On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira [EMAIL PROTECTED] wrote: 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.):

Re: Locale definitions, dots and commas

2008-03-12 Thread zz
On Wednesday 12 March 2008 17:31:32 Andrew W. Nosenko wrote: On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira [EMAIL PROTECTED] wrote: 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,

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
Andrew W. Nosenko wrote: On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira [EMAIL PROTECTED] wrote: 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

Locale definitions, dots and commas

2008-03-11 Thread Carlos Pereira
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).

Re: Locale definitions, dots and commas

2008-03-11 Thread Martín RV (OPENGeoMap)
Hi: 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