SPSS Statistics

Expand all | Collapse all

Encoding SPS when using Open > syntax dialog box

  • 1.  Encoding SPS when using Open > syntax dialog box

    Posted Thu August 12, 2021 10:29 AM
    Hello, fellow data mongers,

    On PC running Widows OS when using the Stats v .27.0.1 to File > Open > syntax and get the appropriate dialog box I can see an encoding dropbox so I could choose under which encoding the syntax document will work.



    Strangely enough, when I use Stats v .27.0.1 on MAC OS Big-Sur there is non-such dropbox, so I can't choose the encoding for the syntax.

    Did anyone encounter such an issue? can anyone with a MAC with OS Big-Sur confirm there is no such option?

    Thanks!








    ------------------------------
    Meni Berger
    ------------------------------


  • 2.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Thu August 12, 2021 11:43 AM
    V27 by default uses the native Mac file dialogs, which, of course, don't have the SPSS-specific options.  But you can go to Edit > Options and choose to use the SPSS versions, which will give you all those options.

    --





  • 3.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Sun August 15, 2021 02:04 AM
    Hello Jon,

    thank you for the advice, although already been there.

    This is a legacy issue. Hebrew unreadable gibberish in an old syntax (v.20) that does not comply with the encoding setting on MAC.
    I have to open it on a PC running Stats v. 27.0.1 under unicode=yes. save it. send it back to MAC. only then I can see Hebrew Characters. 
    I thought if I can find the encoding option on MAC this might help.
    Do you know any encoding conversion utilities on MAC?



    ------------------------------
    Meni Berger
    ------------------------------



  • 4.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Sun August 15, 2021 09:25 AM
    I think the Mac terminal has the iconv utility, so you could convert a file using code like this

    iconv -f iso-8859-1 -t utf-8 < x,sps > y.sps
    where iso-8859-1 is replaced by the encoding name for Hebrew on the Mac.  You might be able to use he or heb or you might need a numerical code.

    You might be able to have the SE do this automatically when you open a file if you have your locale set for Hebrew.
    Note: the encoding setting on the file dialogs will not appear if you are using the standard Mac encoding dialogs, which became the default in V27 or 28, but you can change that in Edit Options.

    --





  • 5.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Mon August 16, 2021 01:40 AM
    ICONV sounds like a useful idea, although for the user, so I suspect, it would sound cumbersome and intimidating.

    What is this SE you mentioned? 

    also, wherein the Edit>Options can I change the default dialog encoding setting?


    ------------------------------
    Meni Berger
    ------------------------------



  • 6.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Mon August 16, 2021 08:35 AM
    SE = syntax editor.  The Open dialog should have an encoding control, so if the SPSS locale is set properly, it should convert the syntax file when it is opened.  You could also make a shell script that would run iconv on a batch of syntax files.

    I don't know where the setting for the dialogs is on the Mac as it doesn't exist on Windows, but I would guess that it would be on the General tab.  Options Help would probably explain it.

    --





  • 7.  RE: Encoding SPS when using Open > syntax dialog box

    Posted Wed August 18, 2021 03:28 AM
    Hello Jon,

    Thank you for advising. I'll try to do as you directed.




    ------------------------------
    Meni Berger
    ------------------------------