Read dictionary encoding from data files.
[pspp-builds.git] / src / data / sys-file-reader.c
index 84d7f83c4c422a502272ec47039aeb3bb5889b18..fb4f6f93defcc8cc7486fd3039fe7a36f8efd37a 100644 (file)
@@ -778,7 +778,12 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict,
     case 20:
       /* New in SPSS 16.  Contains a single string that describes
          the character encoding, e.g. "windows-1252". */
-      break;
+      {
+       char *encoding = calloc (size, count + 1);
+       read_string (r, encoding, count + 1);
+       dict_set_encoding (dict, encoding);
+       return;
+      }
 
     case 21:
       /* New in SPSS 16.  Encodes value labels for long string