bugPSPP - Bugs: bug #24535, PSPP(IRE) should default to...

 
 

bug #24535: PSPP(IRE) should default to locale's decimal point character

Submitter:  Harry Thijssen <unknown_one>
Submitted:  Sun 12 Oct 2008 10:01:29 AM UTC
   
 
Category:  Internationalization/Localization Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 15 Oct 2008 03:17:18 AM UTC, comment #8: 


>The other issues can be discussed on the list or in a new item if >appropriate.


OK, I filed bug #24566 ("make check" results should be independent of user's locale) so as not to lose track of this issue.

Ben Pfaff <blp>
Group administrator
Wed 15 Oct 2008 03:09:53 AM UTC, comment #7: 

I've pushed this patch to master.

With that, I'm closing this bug, since it addresses the original concern.  The other issues can be discussed on the list or in a new item if appropriate.

John Darrington <jmd>
Group administrator
Tue 14 Oct 2008 10:47:24 PM UTC, comment #6: 

JMD wrote:

>after applying it, almost all tests will fail if you run "make
>check" whilst your system locale is set to any value which doesn't
>use '.' as its decimal separator.


Not hard to fix: set up TESTS_ENVIRONMENT in the "tests" directory to set LC_ALL and other important environment variables to "C" (which always has "." as the decimal point).

unknown-1 wrote:

>In the current psppire version you can import delimited files with
>point or with comma, not both.


Should not be true.  What have you actually tried?

Ben Pfaff <blp>
Group administrator
Tue 14 Oct 2008 08:44:48 PM UTC, comment #5: 

The patch works fine, but I agree, this needs some more thinking.

As John mentions, make check is a problem, but there is a second problem. In the current psppire version you can import delimited files with point or with comma, not both. You can work around with "set decimal" but I guess that is not obvious for the average user.

Unfortunately this might be a problem in europe as we normaly use comma, but we also have software and files in which point is used. So the possibility of importing both would be a great benefit.

I would suggest changing the import procedure so you can choose if point or comma is used. Offcourse the system setting should be the default

Any more thoughts about this?

Harry Thijssen <unknown_one>
Mon 13 Oct 2008 01:40:51 AM UTC, comment #4: 

The whole locale issue can get a bit hairy in pspp.  We need to think about it quite carefully.

However, in the meantime, I think this patch will address unknown-1's immediate problem.  The caveat is, that after applying it, almost all tests will fail if you run "make check" whilst your system locale is set to any value which doesn't use '.' as its decimal separator.

It may be a good idea to make the format guesser a bit more intelligent, by having it not guess the decimal separator as a field separator, but I'll leave this for Ben to do if he wants to.



(file #16661)

John Darrington <jmd>
Group administrator
Sun 12 Oct 2008 05:03:24 PM UTC, comment #3: 


>But it would be cleaner if the system settings are used.


Yes, that's a good suggestion.  I've changed the title of this bug report to reflect that.

>Is there a way to have some kind of configuration file for
>PSPPire?


We could certainly do that.  The command-line version of PSPP already has one, but PSPPIRE does not use it.

I've now added a pointer to this bug report from bug #23182 that is already suggesting changes to the PSPPIRE command line interface.

Ben Pfaff <blp>
Group administrator
Sun 12 Oct 2008 10:41:33 AM UTC, comment #2: 

"SET DECIMAL=comma" works.

Surprising for me, but even the import function works nice then.

But it would be cleaner if the system settings are used.

Is there a way to have some kind of configuration file for PSPPire?
When you can place "SYNTAX=BATCH" and "SET DECIMAL=comma" in such a file, that would be a nice and convenient workaround.

Harry Thijssen <unknown_one>
Sun 12 Oct 2008 10:14:22 AM UTC, comment #1: 

Did you try

 SET DECIMAL=comma.

??

John Darrington <jmd>
Group administrator
Sun 12 Oct 2008 10:01:29 AM UTC, original submission:  


On my openSUSE 11 platform using PSPPire 0.6.1 I have the next problem. My decimalcharacter is "," which is normal in Europe. However, in PSSpire I see my numbers as 7.88 etc. It should be 7,88

More a problem is importing from a delimited text file. If my test file contains:

"var1";"var2"
7,88;89
5,3;6,2

Until choosing separators, everything looks ok. But on the next screen, "Adjust Variable Formats", things go wrong. If I continue anyway I get the errors:

/home/xx/Desktop/test.csv:2: data file warning: (columns 1-0, F field) Number followed by garbage.
/home/xx/Desktop/test.csv:3: data file warning: (columns 1-0, F field) Number followed by garbage.
/home/xx/Desktop/test.csv:3: data file warning: (columns 5-4, F field) Number followed by garbage.



Harry Thijssen <unknown_one>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #16661:  decimal.patch added by jmd (3KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by unknown_one (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-15 jmd StatusReady for Test/Review Fixed
        Open/ClosedOpen Closed
    2008-10-13 jmd Attached File- Added decimal.patch, #16661
        StatusNone Ready for Test/Review
    2008-10-12 blp SummaryProblems with european way of writing numbers PSPP(IRE) should default to locale's decimal point character

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code