strange symbols in write outfile

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

strange symbols in write outfile

Maguin, Eugene

I’m writing an output data file using write outfile and the first line has some strange symbols in it prior to the data record.

 

 30 4 3 1 1 4.000000 4.000000 3.750000 2.000000 3.400000 1 2 3 1

 

I may be wrong but I think these magically appeared with 21. They do something, I’m sure, (and I think that something may have been mentioned on the list before but I don’t recall); I’m curious what it is. Can they be suppressed (because their presence screws up the data read in Mplus, which could be a limitation in that program). And, the surprising thing, the damn things can’t be seen or removed in notepad.

 

Gene Maguin

Reply | Threaded
Open this post in threaded view
|

Re: strange symbols in write outfile

Jon K Peck
The first three bytes in the output are the Byte Order Mark (BOM) that indicate that this is a Unicode text file.

You don't see them in Notepad, because Notepad correctly interprets them as a non-data part of the file and interprets the contents as Unicode characters.  If you save the file from Notepad choosing Save As with the encoding set to Ascii, they will be removed.

If you want the file in the old-style code page encoding, you can add ENCODING="Locale" to the syntax or run Statistics in code page mode.

In the example below, the actual character codes would be the same in both code page and Unicode modes.


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




From:        "Maguin, Eugene" <[hidden email]>
To:        [hidden email],
Date:        08/22/2013 08:04 AM
Subject:        [SPSSX-L] strange symbols in write outfile
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I’m writing an output data file using write outfile and the first line has some strange symbols in it prior to the data record.
 
 30 4 3 1 1 4.000000 4.000000 3.750000 2.000000 3.400000 1 2 3 1
 
I may be wrong but I think these magically appeared with 21. They do something, I’m sure, (and I think that something may have been mentioned on the list before but I don’t recall); I’m curious what it is. Can they be suppressed (because their presence screws up the data read in Mplus, which could be a limitation in that program). And, the surprising thing, the damn things can’t be seen or removed in notepad.
 
Gene Maguin