dictionary: Make dict_create() take the new dictionary's encoding.
[pspp-builds.git] / src / data / sys-file-reader.c
index 6643b85da2848551cac05a352395e0c7bc9907c5..7e5a9e0fe1c6396306060abce27938460cf6869f 100644 (file)
@@ -428,10 +428,8 @@ sfm_open_reader (struct file_handle *fh, struct dictionary **dictp,
 
      First, figure out the correct character encoding, because this determines
      how the rest of the header data is to be interpreted. */
-  dict = dict_create ();
-  r->encoding = choose_encoding (r, extensions[EXT_INTEGER],
-                                 extensions[EXT_ENCODING]);
-  dict_set_encoding (dict, r->encoding);
+  dict = dict_create (choose_encoding (r, extensions[EXT_INTEGER],
+                                       extensions[EXT_ENCODING]));
 
   /* These records don't use variables at all. */
   if (document != NULL)