unable to open .csv files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to open .csv files

vstirkey
I am using SPSS 22. When I attempt to read in text data, a .csv file, I get an error message that reads, "unicode encoding of this file is not supported by the text wizard." IBM help says this problem was resolved with SPSS 22, but I am still getting it. Does any one have any suggestions on how i can get this file to open? Is there a setting that needs to be changed? I tried changing local encoding to unicode and back in the Open Data window, this did not resolve the problem. Thank you for any help you can give with this!
Reply | Threaded
Open this post in threaded view
|

Re: unable to open .csv files

Jon K Peck
I suspect that your csv file has a BOM (Byte Order Mark) at the start, which means that it is encoded in Unicode UTF-8.  If so, you can't read it with fixed format, because characters are variable width in utf-8, but you can read it with free format.  If you open the file in Notepad, you can see the encoding Notepad thinks it is in, and you can save it in code page (Save As).  If the text does not contain any extended characters, i.e., is plain ascii, the effect is just to remove the BOM.  If you use a plain text editor that is not Unicode aware, you would see the BOM as three funny characters on the first line.

V22 also supports /ENCODING="LOCALE", which says that the file is in a code page encoding, but the BOM would override this.  However, with Statistics in Unicode mode, a code page file with no BOM could be read with this specification.






Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        vstirkey <[hidden email]>
To:        [hidden email]
Date:        12/31/2014 09:54 AM
Subject:        [SPSSX-L] unable to open .csv files
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I am using SPSS 22. When I attempt to read in text data, a .csv file, I get
an error message that reads, "unicode encoding of this file is not supported
by the text wizard." IBM help says this problem was resolved with SPSS 22,
but I am still getting it. Does any one have any suggestions on how i can
get this file to open? Is there a setting that needs to be changed? I tried
changing local encoding to unicode and back in the Open Data window, this
did not resolve the problem. Thank you for any help you can give with this!



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/unable-to-open-csv-files-tp5728309.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD