bugPSPP - Bugs: bug #41863, "Only" the first 255 of...

 
 

bug #41863: "Only" the first 255 of 256 characters of a variable label are read by pspp

Submitted by:  Andre Müller <andrem>
Submitted on:  Thu 13 Mar 2014 05:22:02 PM UTC  
 
Category: System/Portable File I/OSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment (Rich MarkupRich 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)

Thu 20 Mar 2014 12:29:50 PM UTC, comment #7:

Yep, the fresh build does the job smoothly.
So, now this is properly fixed.
Thanks!

Andre Müller <andrem>
Wed 19 Mar 2014 03:51:14 AM UTC, comment #6:

> I tried the current nightly build
> and it still cuts the variable labels after 255 characters,
> so I can see no change.


Foolishly, I made the change without testing it, so of course it didn't work ;-)

I've now tested it with ZA4813.sav, found the problem, and fixed it. Please try tomorrow morning's build.

Ben Pfaff <blp>
Project Administrator
Tue 18 Mar 2014 01:56:29 PM UTC, comment #5:

I tried the current nightly build
http://benpfaff.org/~blp/pspp-master/20140318030509/source/pspp-0.8.2-g4842a2.tar.gz
and it still cuts the variable labels after 255 characters,
so I can see no change.

Is the fix supposed to be in there?
I tried both exporting to .csv and viewing the data in psppire.

Andre Müller <andrem>
Mon 17 Mar 2014 01:40:59 PM UTC, comment #4:

Thanks a lot, I will try this out.

I also found the 256 chars strange, given
a 255 byte limit, but that's not the first
off by one error I found in SPSS docs vs. reality.

Now, for the way longer label (as in 327 chars),
I do suspect the rather crude unicode handling
(and a missing check) may be responsible for
this. I remember reading that for unicode,
SPSS triples all field lengths.
This may lead to accepting entries well beyond
the spec.

Andre Müller <andrem>
Sun 16 Mar 2014 05:23:46 PM UTC, comment #3:

I checked in a patch that enables longer labels.

Ben Pfaff <blp>
Project Administrator
Sun 16 Mar 2014 04:39:14 PM UTC, comment #2:

The SPSS 22 manual says that variable labels have a 255-byte limit, which is why I've previously resisted increasing the limit. But since you say you have a file with 327-byte labels, I guess that I can increase it.

Ben Pfaff <blp>
Project Administrator
Fri 14 Mar 2014 02:43:06 PM UTC, comment #1:

I should amend this:
I found a more recent dataset,
and more recent SPSS versions can carry more than
256 characters in a label, I found up to 327 characters used.

The pspp export cuts these after 255 characters as well.
So that does not really look like an off by one error
after all.

So to rephrase:
PSPP uses only the first 255 characters
of a value label. Quite often, the value labels are longer;
SPSS used to have a 256 character limit, but that has been
increased since. It would be nice if PSPP could handle >255 characters.

Andre Müller <andrem>
Thu 13 Mar 2014 05:22:02 PM UTC, original submission:

PSPP only reads 255 characters of a variable label from sav files.
The label can be up to 256 characters long.
So, this smells like an off by one error.
I found half a dozen instances of this, so this behaviour
looks consistent at a glance.

The character misses both looking at the entry in the psppire gui and the "DISPLAY DICTIONARY" output.

An example dataset is here (needs registration):
https://dbk.gesis.org/dbksearch/download.asp?db=D&id=36757

The entry maxing out is in variable d4a (index 65).

Andre Müller <andrem>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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 andrem (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 16 Mar 2014 05:23:46 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup