sys-file-reader: Add character encoding record to all the tests.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 16 Feb 2014 22:46:27 +0000 (14:46 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 16 Feb 2014 22:46:27 +0000 (14:46 -0800)
This will avoid a warning added in a later commit when reading a system
file with no encoding record and no specific encoding specified.

tests/data/sys-file-reader.at

index e181b26eb580d691ef3d54b99d5b8b1b9f4f6511..c4d16b3294038f0ff8d83954be9770cb31ba9cca 100644 (file)
@@ -205,6 +205,9 @@ dnl Numeric variable, variable label.
 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
 26; "Numeric variable 2's label"; i8 0 *2;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -256,6 +259,9 @@ dnl Numeric variable, variable label.
 dnl Machine integer info record (SPSS 13).
 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -668,6 +674,9 @@ dnl Numeric variables.
 dnl Extra product info.
 7; 10; 1; COUNT ("Extra product info"; i8 13; "another line"; i8 13; "blah");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -740,6 +749,9 @@ dnl Variable display parameters
 0; 1;
 0; 2;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -855,6 +867,9 @@ dnl Variable display parameters
 0; 11; 1;
 0; 12; 2;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -1250,6 +1265,9 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -1309,6 +1327,9 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -1368,6 +1389,9 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -1431,12 +1455,15 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
 dnl ZLIB data header.
-i64 0x178;    # zheader_ofs
-i64 0x1e9;    # ztrailer_ofs
+i64 0x194;    # zheader_ofs
+i64 0x205;    # ztrailer_ofs
 i64 48;       # ztrailer_len
 
 dnl ZLIB data block.
@@ -1465,8 +1492,8 @@ i64 0;        # ztrailer_zero
 1;            # n_blocks
 
 dnl ZLIB block descriptor:
-i64 0x178;    # uncompressed_ofs
-i64 0x190;    # compressed_ofs
+i64 0x194;    # uncompressed_ofs
+i64 0x1ac;    # compressed_ofs
 88;           # uncompressed_size
 89;           # compressed_size
 EOF
@@ -1559,6 +1586,9 @@ dnl File header.
 dnl Numeric variable.
 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1582,6 +1612,9 @@ dnl File header.
 dnl Numeric variable.
 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1605,6 +1638,9 @@ dnl File header.
 dnl Numeric variable.
 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1628,6 +1664,9 @@ dnl File header.
 dnl String variable with invalid width 256.
 2; 256; 0; 0; 0x050800 *2; s8 "VAR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1654,6 +1693,9 @@ dnl Numeric variables.
 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1688,6 +1730,9 @@ dnl File header.
 dnl Numeric variable.
 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1711,6 +1756,9 @@ dnl File header.
 dnl Numeric variable.
 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1734,6 +1782,9 @@ dnl File header.
 dnl String variable.
 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1758,6 +1809,9 @@ dnl String variable.
 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1";
 >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<<
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1792,6 +1846,9 @@ dnl String variable, numeric formats.
 dnl String variable, wrong width formats.
 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1931,6 +1988,9 @@ dnl Numeric variable.
 dnl String variable.
 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1968,6 +2028,9 @@ dnl Numeric variable.
 dnl String variable.
 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -1995,6 +2058,9 @@ dnl Long string variable.
 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
 (2; -1; 0; 0; 0; 0; s8 "");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2024,6 +2090,9 @@ dnl Two document records.
 dnl Dictionary termination record.
 999; 0;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Data.
 1.0;
 ])
@@ -2106,6 +2175,9 @@ dnl Numeric variable, no label or missing values.
 dnl Unknown extension record type.
 7; 30; 1; 1; i8 0;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2133,6 +2205,9 @@ dnl Numeric variable, no label or missing values.
 dnl Machine integer info record.
 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2160,6 +2235,9 @@ dnl Numeric variable, no label or missing values.
 dnl Machine integer info record.
 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2187,6 +2265,9 @@ dnl Numeric variable, no label or missing values.
 dnl Machine integer info record.
 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2223,6 +2304,9 @@ dnl Numeric variable, no label or missing values.
 dnl Machine floating-point info record.
 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2250,6 +2334,9 @@ dnl Numeric variable, no label or missing values.
 dnl Machine floating-point info record.
 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2380,6 +2467,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=Cx");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2405,6 +2495,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=Ex");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2430,6 +2523,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=E 2");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2457,6 +2553,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2482,6 +2581,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=Dx");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2507,6 +2609,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=D1x");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2532,6 +2637,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=D4 abc");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2557,6 +2665,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=D3 abcx");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2582,6 +2693,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=C 0  NUM1");
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2609,6 +2723,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=C 0  NUM1 NUM1"; i8 10);
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2637,6 +2754,9 @@ dnl Variables.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=C 0  NUM1 STR1"; i8 10);
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2664,6 +2784,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=C 0  NUM1"; i8 10);
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2689,6 +2812,9 @@ dnl Numeric variable, no label or missing values.
 dnl Multiple response sets.
 7; 7; 1; COUNT("$a=C 0  NUM1"; i8 10; "$b=C 0  "; i8 10);
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 999; 0;
 ])
 for variant in be le; do
@@ -2716,6 +2842,9 @@ dnl Numeric variable, no label or missing values.
 dnl Display parameters record.
 7; 11; >>8<<; 2; 1.0; 1.0;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2742,6 +2871,9 @@ dnl Numeric variable, no label or missing values.
 dnl Display parameters record.
 7; 11; 4; >>4<<; 1; 1; 2; 2;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2768,6 +2900,9 @@ dnl Numeric variable, no label or missing values.
 dnl Display parameters record.
 7; 11; 4; 2; >>4<<; 0;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2794,6 +2929,9 @@ dnl Numeric variable, no label or missing values.
 dnl Display parameters record.
 7; 11; 4; 2; 1; >>-1<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -2820,6 +2958,9 @@ dnl Numeric variables.
 dnl Long variable names.
 7; 13; 1; COUNT (>>"xyzzy"<<);
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -2854,6 +2995,9 @@ dnl Long variable names.
 "LONGVA_B=LONGVARIABLENAME"; i8 9;
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -2887,6 +3031,9 @@ dnl Very long string map.
 "NUM1=00256"; i8 0; i8 9;
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -2923,6 +3070,9 @@ dnl Very long string map.
 "STR1=00256"; i8 0; i8 9;
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -2975,6 +3125,9 @@ dnl Numeric variable.
 dnl Value label with missing type 4 record.
 3; 1; 1.0; i8 3; s7 "one";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 >>999; 0<<;
 ])
@@ -3027,6 +3180,9 @@ dnl Long string variable.
 dnl Value label that names long string variable.
 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -3055,6 +3211,9 @@ dnl Variables.
 dnl Value label that names numeric and string variables.
 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -3084,6 +3243,9 @@ dnl Duplicate value labels.
 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<;
 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<;
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl End of dictionary.
 999; 0;
 ])
@@ -3121,6 +3283,9 @@ dnl Variable attributes record.
   "fred('23'"; i8 10
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -3159,6 +3324,9 @@ dnl Variable attributes record.
   "fred(23"; i8 10; ")"
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -3210,6 +3378,9 @@ COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'");
 >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<;
 );
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 ])
@@ -3242,6 +3413,9 @@ dnl Numeric variables.
 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Data.
 999; 0;
 1.0; 2.0;
@@ -3279,6 +3453,9 @@ dnl Numeric variables.
 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Data.
 999; 0;
 1.0; 2.0;
@@ -3290,7 +3467,7 @@ for variant in be le; do
 LIST.
 ])
   AT_CHECK([pspp -O format=csv sys-file.sps], [1], 
-   [error: `sys-file.sav' near offset 0x110: File ends in partial case.
+   [error: `sys-file.sav' near offset 0x12c: File ends in partial case.
 
 Table: Data List
 num1,num2
@@ -3310,6 +3487,9 @@ dnl Numeric variables.
 2; 14; 0; 0; 0x010e00 *2; s8 "STR14";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Data.
 999; 0;
 s14 "one data item";
@@ -3321,7 +3501,7 @@ for variant in be le; do
 LIST.
 ])
   AT_CHECK([pspp -O format=csv sys-file.sps], [1], 
-   [error: `sys-file.sav' near offset 0x10e: Unexpected end of file.
+   [error: `sys-file.sav' near offset 0x12a: Unexpected end of file.
 
 Table: Data List
 str14
@@ -3354,6 +3534,9 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
@@ -3366,7 +3549,7 @@ for variant in be le; do
 LIST.
 ])
   AT_CHECK([pspp -O format=csv sys-file.sps], [1], 
-   [error: `sys-file.sav' near offset 0x190: File ends in partial case.
+   [error: `sys-file.sav' near offset 0x1ac: File ends in partial case.
 
 Table: Data List
 num1,num2,str4,str8,str15
@@ -3382,7 +3565,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Wrong ZLIB data header offset 0 (expected 0x178).
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Wrong ZLIB data header offset 0 (expected 0x194).
 ])
 done
 AT_CLEANUP
@@ -3394,7 +3577,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Impossible ZLIB trailer offset 0x0.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Impossible ZLIB trailer offset 0x0.
 ])
 done
 AT_CLEANUP
@@ -3408,7 +3591,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Invalid ZLIB trailer length 12.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Invalid ZLIB trailer length 12.
 ])
 done
 AT_CLEANUP
@@ -3421,8 +3604,8 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x190: End of ZLIB trailer (0x231) is not file size (0x219).
-error: `sys-file.sav' near offset 0x201: 72-byte ZLIB trailer specifies 1 data blocks (expected 2).
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1ac: End of ZLIB trailer (0x24d) is not file size (0x235).
+error: `sys-file.sav' near offset 0x21d: 72-byte ZLIB trailer specifies 1 data blocks (expected 2).
 ])
 done
 AT_CLEANUP
@@ -3434,7 +3617,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x1f1: ZLIB trailer bias (0) differs from file header bias (100.00).
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x20d: ZLIB trailer bias (0) differs from file header bias (100.00).
 ])
 done
 AT_CLEANUP
@@ -3446,7 +3629,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x1f9: ZLIB trailer "zero" field has nonzero value 100.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x215: ZLIB trailer "zero" field has nonzero value 100.
 ])
 done
 AT_CLEANUP
@@ -3458,7 +3641,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x1fd: ZLIB trailer specifies unexpected 4096-byte block size.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x219: ZLIB trailer specifies unexpected 4096-byte block size.
 ])
 done
 AT_CLEANUP
@@ -3470,7 +3653,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: 48-byte ZLIB trailer specifies 2 data blocks (expected 1).
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: 48-byte ZLIB trailer specifies 2 data blocks (expected 1).
 ])
 done
 AT_CLEANUP
@@ -3482,7 +3665,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x178 was expected.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x194 was expected.
 ])
 done
 AT_CLEANUP
@@ -3494,7 +3677,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x190 was expected.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x1ac was expected.
 ])
 done
 AT_CLEANUP
@@ -3523,12 +3706,15 @@ dnl String variable.
 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
 2; -1; 0; 0; 0; 0; s8 "";
 
+dnl Character encoding record.
+7; 20; 1; 12; "windows-1252";
+
 dnl Dictionary termination record.
 999; 0;
 
 dnl ZLIB data header.
-i64 0x178;    # zheader_ofs
-i64 0x190;    # ztrailer_ofs
+i64 0x194;    # zheader_ofs
+i64 0x1ac;    # ztrailer_ofs
 i64 72;       # ztrailer_len
 
 dnl This is where the ZLIB data blocks would go, but we don't need any to
@@ -3541,14 +3727,14 @@ i64 0;        # ztrailer_zero
 2;            # n_blocks
 
 dnl ZLIB block descriptor 1:
-i64 0x178;    # uncompressed_ofs
-i64 0x190;    # compressed_ofs
+i64 0x194;    # uncompressed_ofs
+i64 0x1ac;    # compressed_ofs
 0x100000;     # uncompressed_size
 0x12345;      # compressed_size
 
 dnl ZLIB block descriptor 2:
-i64 0x100178; # uncompressed_ofs
-i64 0x12405;  # compressed_ofs
+i64 0x100194; # uncompressed_ofs
+i64 0x12421;  # compressed_ofs
 0x100000;     # uncompressed_size
 0x12345;      # compressed_size
 ])
@@ -3556,8 +3742,8 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1a8: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected.
-error: `sys-file.sav' near offset 0x1c0: ZLIB block descriptor 1 reported compressed data offset 0x12405, when 0x124d5 was expected.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1c4: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected.
+error: `sys-file.sav' near offset 0x1dc: ZLIB block descriptor 1 reported compressed data offset 0x12421, when 0x124f1 was expected.
 ])
 done
 AT_CLEANUP
@@ -3569,7 +3755,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected.
 ])
 done
 AT_CLEANUP
@@ -3582,7 +3768,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50.
 ])
 done
 AT_CLEANUP
@@ -3594,7 +3780,7 @@ for variant in be le; do
   AT_CHECK([sack --$variant sys-file.sack > sys-file.sav])
   AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
 ])
-  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x219: ZLIB trailer is at offset 0x1e9 but 0x1e8 would be expected from block descriptors.
+  AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x235: ZLIB trailer is at offset 0x205 but 0x204 would be expected from block descriptors.
 ])
 done
 AT_CLEANUP