[grisbi-bugs] [Grisbi-0.6.0 0000689]: Amounts modified after saving

bugtracker at grisbi.org bugtracker at grisbi.org
Mon May 24 20:47:40 CEST 2010


The following issue has been CLOSED 
====================================================================== 
http://grisbi.tuxfamily.org/mantis/view.php?id=689 
====================================================================== 
Reported By:                carcam
Assigned To:                guneeyoufix
====================================================================== 
Project:                    Grisbi-0.6.0
Issue ID:                   689
Category:                   Main
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Plateforme:                 Linux 
OS:                         Debian 
Version OS:                 Squeeze 
Unstable Impact:            Yes 
Version GTK:                 
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             10-20-2009 08:31 UTC
Last Modified:              05-24-2010 18:47 UTC
====================================================================== 
Summary:                    Amounts modified after saving
Description: 
After saving any file, and reopening it, the amounts get confused with the
dots and the colons.

That is, in the Grisbi file if I have an amount of Am="100,00", after
saving it, it gets Am="100.00", and when I open the file with Grisbi I get
1000,00 for that specific transaction.
====================================================================== 

---------------------------------------------------------------------- 
 guneeyoufix - 10-21-09 10:01  
---------------------------------------------------------------------- 
Very wierd and definitely worth looking into.
Any ideas on how to reproduce? Could you send an example file illustrating
the problem?

Très bizarre et ça vaudrait le coup d'y jeter un oeil.
Quelles manipulations pour reproduire le bug ? Pourriez-vous envoyer un
fichier d'exemple illustrant le problème? 

---------------------------------------------------------------------- 
 carcam - 10-21-09 10:08  
---------------------------------------------------------------------- 
I have been doing some research, and it seems to be related to my
particular locales configuration.

On Windows I have solved the issue setting the LC_MONETARY to EUR, and I
will try change my Debian configuration too, because it has been doing
weird things since the beginning.

The point is that I take a CVS snapshot once a week, and this issue has
been happening only in the last month.

As soon as I confirmed the locale problem I will close the issue. Sorry
for the inconveniences. 

---------------------------------------------------------------------- 
 guneeyoufix - 10-21-09 10:24  
---------------------------------------------------------------------- 
No problem and thanks for the quick feedback.

I indeed did some changes on how the locale is used in grisbi.

For Windows, I'd recommend using "official" locale values. These are the
official ISO 639-2 three letter language/country codes.
Pick the one you need there:
http://www.loc.gov/standards/iso639-2/php/code_list.php 

---------------------------------------------------------------------- 
 carcam - 10-22-09 09:11  
---------------------------------------------------------------------- 
After testing on my Debian Squeeze, The amounts keep changing. My Locales
are:

LANG=es_ES.UTF-8
LANGUAGE=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=es_ES.UTF-8

Any idea? 

---------------------------------------------------------------------- 
 guneeyoufix - 11-15-09 21:24  
---------------------------------------------------------------------- 
Could you try again with grisbi 0.6.0 beta 3?
Some packaged for Debian experimental should be available on the
repositories. 

---------------------------------------------------------------------- 
 guneeyoufix - 11-18-09 10:41  
---------------------------------------------------------------------- 
 

---------------------------------------------------------------------- 
 carcam - 11-29-09 11:55  
---------------------------------------------------------------------- 
Hi guneeyoufix,
I usually get the latest cvs version on my Debian and use it. I am still
having the problem, and although at first I suspected on my configuration,
I have experienced the same problem on another Debian. 

---------------------------------------------------------------------- 
 carcam - 12-08-09 21:25  
---------------------------------------------------------------------- 
Hi guneeyoufix, I have just updated and the bug is still here. Do you need
more information? 

---------------------------------------------------------------------- 
 guneeyoufix - 12-10-09 13:37  
---------------------------------------------------------------------- 
Hello carcam,

I'm pretty busy with other "real life" things, so I haven't had much time
to look into grisbi lately.

Here are some questions for you to answer:

What is the monetary decimal separator in the es_ES locale?
Edit -- Reply = it's','
What is the monetary thousands separator in the es_ES locale?
Edit -- Reply = it's'.'
Edit -- This is the cause of the problem, because in the gsb files,
ammounts are written with a '.' as a decimal separator.  

Could you also try the latest Windows beta (beta 3) and tell me if the
problem is still here?
Edit -- Yes the problem is present with spanish locale on Vista

Thanks

 

---------------------------------------------------------------------- 
 guneeyoufix - 12-10-09 13:44  
---------------------------------------------------------------------- 
The problem is with the decimal separator/thousands separator.

In the gsb file, the decimal separator is '.'
In the spanish locale, it is ',' ; '.' is the thousands separator.

Reading a number from an input box, and reading numbers from a gsb file
are done using the same method. This is the cause of the problem, because
of the obvious overlap of symbols.

What we need to do is change the file loading procedure to not use the
"read user input" method, but use separate methods with a well-known
format. This way, file loading performance should improve. 

---------------------------------------------------------------------- 
 guneeyoufix - 12-10-09 15:09  
---------------------------------------------------------------------- 
Should be fixed in CVS. If not please, reopen the bug.

* grisbi/src/ (gsb_file_load.c gsb_real.c):
Fixed problem with separators with spanish locale (and probably other
locales as well) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-20-09 08:31  carcam         New Issue                                    
10-20-09 08:31  carcam         OS                        => Debian          
10-20-09 08:31  carcam         Unstable Impact           => Yes             
10-20-09 08:31  carcam         Version OS                => Squeeze         
10-21-09 10:01  guneeyoufix    Note Added: 0001232                          
10-21-09 10:01  guneeyoufix    Status                   new => feedback     
10-21-09 10:08  carcam         Note Added: 0001233                          
10-21-09 10:14  guneeyoufix    Status                   feedback => assigned
10-21-09 10:14  guneeyoufix    Assigned To               => guneeyoufix     
10-21-09 10:24  guneeyoufix    Note Added: 0001235                          
10-22-09 09:11  carcam         Note Added: 0001241                          
10-27-09 20:15  pbiava         Project                  Grisbi => Grisbi-0.6.0
11-15-09 21:24  guneeyoufix    Plateforme                => Linux           
11-15-09 21:24  guneeyoufix    Note Added: 0001297                          
11-15-09 21:24  guneeyoufix    Status                   assigned => feedback
11-18-09 10:41  guneeyoufix    Note Added: 0001326                          
11-27-09 21:55  guneeyoufix    Status                   feedback => assigned
11-29-09 11:55  carcam         Note Added: 0001380                          
12-08-09 21:25  carcam         Note Added: 0001422                          
12-10-09 11:44  guneeyoufix    Note Added: 0001426                          
12-10-09 11:44  guneeyoufix    Status                   assigned => feedback
12-10-09 13:37  guneeyoufix    Note Edited: 0001426                         
12-10-09 13:44  guneeyoufix    Note Added: 0001428                          
12-10-09 13:44  guneeyoufix    Status                   feedback => assigned
12-10-09 15:09  guneeyoufix    Status                   assigned => resolved
12-10-09 15:09  guneeyoufix    Resolution               open => fixed       
12-10-09 15:09  guneeyoufix    Note Added: 0001429                          
05-24-10 18:47  pbiava         Status                   resolved => closed  
======================================================================



More information about the bugsreports mailing list