Convert to utf8 in data_out function.
[pspp-builds.git] / src / ui / gui / dialog-common.c
index 0aab294e12ef0b2a8ca937851f60533525847619..5d52204ce566ad89cdb1807adda7be338bf846e5 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <config.h>
 
+#include <libpspp/i18n.h>
 #include "dialog-common.h"
 
 #include "psppire-var-ptr.h"
@@ -113,14 +114,9 @@ cell_var_name (GtkTreeViewColumn *tree_column,
               gpointer data)
 {
   PsppireDict *dict = data;
-  struct variable *var;
-  gchar *name;
-
-  var = get_selected_variable (tree_model, iter, dict);
+  const struct variable *var = get_selected_variable (tree_model, iter, dict);
 
-  name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL);
-  g_object_set (cell, "text", name, NULL);
-  g_free (name);
+  g_object_set (cell, "text", var_get_name (var), NULL);
 }