Merge commit 'origin/master' into charset
[pspp-builds.git] / src / ui / gui / psppire-data-editor.c
index be911ba6d69817d928264eb13effd969272d029b..9d15ceb94fe53c628b90e3f48ce15e415b0e253d 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <language/syntax-string-source.h>
 #include "psppire-data-store.h"
+#include <libpspp/i18n.h>
 #include <ui/gui/sheet/psppire-axis.h>
 #include "helper.h"
 
@@ -743,7 +744,9 @@ update_data_ref_entry (const PsppireSheet *sheet,
          gchar *text = g_strdup_printf ("%d: %s", row + FIRST_CASE_NUMBER,
                                         var_get_name (var));
 
-         gchar *s = pspp_locale_to_utf8 (text, -1, 0);
+         gchar *s = recode_string (UTF8,
+                                   psppire_dict_encoding (data_store->dict),
+                                   text, -1);
 
          g_free (text);