psppire-syntax-window: Recode file from final encoding, not original one.
[pspp] / src / ui / gui / psppire-syntax-window.c
index 35f57e587b4cc950f30eaf8ef40683426e7b46e4..8491eb3142c7be207f6f3d3d7d67d3498380c611 100644 (file)
@@ -984,7 +984,7 @@ syntax_load (PsppireWindow *window, const gchar *filename,
       sw->encoding = g_strdup (encoding);
     }
 
-  text_utf8 = recode_substring_pool ("UTF-8", encoding,
+  text_utf8 = recode_substring_pool ("UTF-8", sw->encoding,
                                      ss_buffer (text_locale, len_locale),
                                      NULL).string;
   free (text_locale);