#include <data/missing-values.h>
#include <data/value-labels.h>
#include <data/variable.h>
+#include <libpspp/i18n.h>
#include "helper.h"
#include "message-dialog.h"
PsppireDict*
psppire_dict_new_from_dict (struct dictionary *d)
{
- PsppireDict *new_dict = g_object_new (G_TYPE_PSPPIRE_DICT, NULL);
+ PsppireDict *new_dict = g_object_new (PSPPIRE_TYPE_DICT, NULL);
new_dict->dict = d;
dict_set_callbacks (new_dict->dict, &gui_callbacks, new_dict);
{
case DICT_TVM_COL_NAME:
{
- gchar *name = pspp_locale_to_utf8(var_get_name (var), -1, NULL);
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, name);
- g_free (name);
+ gchar *name = recode_string (UTF8, psppire_dict_encoding (dict),
+ var_get_name (var), -1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, name);
+ g_free (name);
}
break;
case DICT_TVM_COL_VAR:
}
}
#endif
+
+
+
+
+const gchar *
+psppire_dict_encoding (const PsppireDict *dict)
+{
+ return dict_get_encoding (dict->dict);
+}