pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #15820] Can not read sav file


From: John Darrington
Subject: Re: [bug #15820] Can not read sav file
Date: Fri, 24 Feb 2006 14:13:37 +0800
User-agent: Mutt/1.5.9i

On Thu, Feb 23, 2006 at 09:19:56PM -0800, Ben Pfaff wrote:
     
     > Reading between the lines in the spss documentation, it seems to
     > suggest that the encoding is that of the environment of the machine
     > which created it.
     
     That's an unpleasant situation, in my opinion.

Indeed.  It wouldn't be so bad if the encoding was contained withing
the file, but that doesn't seem to be the case.
     
     >      I think it'd still be a good idea to sanity-check variable names,
     >      assuming that we can figure out the variable name encoding used
     >      in system files.
     >
     > It would be nice, but in view of the above, I don't think we know what
     > "sane"  is.  We just have to presume sanity unless proved otherwise.
     
     We have the opportunity to translate between character sets,
     using iconv, if we can figure out what character sets to
     translate between.

But I don't think we can figure that out.
     
     We could assume that files we read or write are in the current
     locale.  

But what happens if that assumption is false?  I don't think PSPP
should then claim that the file is "corrupt", and refuse to load it.
If someone gives me a Swedish system file, but I don't have a Swedish
locale on my machine, I'd still like to be able to use that file (I'd
accept that the strings wouldn't display properly for me).

     We could also add an "encoding" option to the SAVE and GET
     commands, to allow dealing translating to/from foreign locales.

This is a good idea.  It would make sure that characters are properly
translated IF you happen to know what the encoding is.  But I think
that GET should still work (do the best it can), even if I don't know
the encoding. 


In view of this rather less than ideal design of SPSS system files, I
think the only thing we can do is to forget validation of variable
names when reading system files (or at least make the validation
rather sloppy). 

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]