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.
|
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.
|
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?
|
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?
|
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)
|
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.
|
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.
|
Sun 12 Oct 2008 10:14:22 AM UTC, comment #1:
Did you try
SET DECIMAL=comma.
??
|
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.
|