Date: Thu, 1 Dec 2011 11:41:43 -0700
Reply-To: Jon K Peck <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jon K Peck <firstname.lastname@example.org>
Subject: Re: String length changes when saving
The string length is probably not changing when you save the data but when
you read it in. This will happen if you open a code page sav file and you
are in Unicode mode in Statistics. This is necessary in order to
guarantee that no string data are lost when the code page characters are
converted to Unicode, because in the worst case, a one-byte character in
code page takes three bytes in Unicode.
Usually, though, this is far too conservative. In fact, if your data only
contain plain roman characters, you don't actually need any extra space.
If you want to reclaim the extra space, you can use the ALTER TYPE command
to shrink the fields down to the minimum required to hold your actual
text. This can be done if you open a dataset interactively by checking
the Minimize string widths box on the Open dialog.
Once you save the data file in Unicode mode, no further string expansion
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
new phone: 720-342-5621
From: J Otterstedt <jotterst@UOREGON.EDU>
Date: 12/01/2011 11:22 AM
Subject: [SPSSX-L] String length changes when saving
Sent by: "SPSSX(r) Discussion" <SPSSX-L@listserv.uga.edu>
A colleague and I both have experienced this problem. When saving data
string variables' length changes to three times what it was originally
designated to be. Why? How can we prevent this?
We use SPSS 19 on a Mac.
View this message in context:
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command