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

 
 

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

Submitted by:  Harry Thijssen <unknown_one>
Submitted on:  Sun 12 Oct 2008 10:01:29 AM UTC  
 
Category: Internationalization/LocalizationSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by jmd (Posted a comment)
  • -unavailable- added by unknown_one (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 15 Oct 2008 03:09:53 AM UTCjmdStatusReady for Test/Review=>Fixed
      Open/ClosedOpen=>Closed
    Mon 13 Oct 2008 01:40:51 AM UTCjmdAttached File-=>Added decimal.patch, #16661
      StatusNone=>Ready for Test/Review
    Sun 12 Oct 2008 05:03:24 PM UTCblpSummaryProblems with european way of writing numbers=>PSPP(IRE) should default to locale's decimal point character

    Back to the top


    Powered by Savane 3.1-cleanup1