sys-file-reader: Take string encoding into account for text records.
[pspp-builds.git] / src / data / sys-file-reader.c
index 6a5afff226130937f8ae387019ca538a705a2cee..aa94e6d63dbeae583f39fd3153d9f5044c50860d 100644 (file)
@@ -430,6 +430,7 @@ sfm_open_reader (struct file_handle *fh, struct dictionary **dictp,
      how the rest of the header data is to be interpreted. */
   dict = dict_create (choose_encoding (r, extensions[EXT_INTEGER],
                                        extensions[EXT_ENCODING]));
+  r->encoding = dict_get_encoding (dict);
 
   /* These records don't use variables at all. */
   if (document != NULL)