changing LOCALE

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

changing LOCALE

Muir Houston-3
Listers:
I supervise international MBA students by distance learning - I have
received a dataset - from Thailand - when I open it  I get the
following:

Warning.  Command name: GET FILE
>PASW Statistics system file "E:\MBA\MBA4\questionnaire.sav" is written
in a character encoding (windows-874)
>incompatible with the current LOCALE setting.  It may not be readable.
>Consider changing LOCALE or setting UNICODE on.  (DATA 1721)

How do I change and do I need to do it each time I open this file and
then change back again?

Thanks
Muir

Muir Houston, HNC, BA (Hons), M.Phil., PhD, FHEA
Research Fellow
School of Education
University of Glasgow
0044+141-330-4699

R3L+ Project - Adult education in the light of the European Quality
Strategy
http://www.learning-regions.net/

GINCO Project - Grundtvig International Network of Course Organisers
http://www.ginconet.eu/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: changing LOCALE

Jon K Peck
You have two choices.  The first is to set your SPSS Statistics locale to be Thai and then open the dataset.  SPSS will continue assuming the Thai locale even in future sessions until you set it back to English or whatever you prefer for your standard locale.

The second choice, which I recommend, is to set Statistics into Unicode mode.  It will then convert the file correctly, and, in fact, it will automatically work in the future with any sort of international file as long as the encoding is marked in it.  Files created since V15 have their encoding recorded.  You can do this in Edit>Options>General, but you cannot have a dataset open when you make the switch.  For older files, you would have to set the appropriate locale before reading (SET LOCALE).

If you save a data file when in this mode, it will be saved as a Unicode file.  If it contains extended/foreign characters, it will not be understood by SPSS versions prior to 16, but if the contents are plain ascii, it will work with other versions.

There are some small syntax compatibility issues with the character handling functions between these modes, since the number of bytes per character is different.  Using the char.something versions of the string functions takes care of this.  Also, Unicode character fields generally are wider.

HTH,

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        Muir Houston <[hidden email]>
To:        [hidden email]
Date:        03/10/2011 08:18 AM
Subject:        [SPSSX-L] changing LOCALE
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Listers:
I supervise international MBA students by distance learning - I have
received a dataset - from Thailand - when I open it  I get the
following:

Warning.  Command name: GET FILE
>PASW Statistics system file "E:\MBA\MBA4\questionnaire.sav" is written
in a character encoding (windows-874)
>incompatible with the current LOCALE setting.  It may not be readable.
>Consider changing LOCALE or setting UNICODE on.  (DATA 1721)

How do I change and do I need to do it each time I open this file and
then change back again?

Thanks
Muir

Muir Houston, HNC, BA (Hons), M.Phil., PhD, FHEA
Research Fellow
School of Education
University of Glasgow
0044+141-330-4699

R3L+ Project - Adult education in the light of the European Quality
Strategy
http://www.learning-regions.net/

GINCO Project - Grundtvig International Network of Course Organisers
http://www.ginconet.eu/

=====================
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