Convert to utf8 in data_out function.
[pspp-builds.git] / src / data / variable.c
index a60adcafcd8d25422f7be32d8f870059c2c028f3..0b5ca26c977236aff6992806a92a1a5a6adc6bc7 100644 (file)
@@ -590,9 +590,10 @@ var_append_value_name (const struct variable *v, const union value *value,
                       struct string *str)
 {
   const char *name = var_lookup_value_label (v, value);
+  const struct dictionary *dict = var_get_vardict (v)->dict;
   if (name == NULL)
     {
-      char *s = data_out (value, &v->print);
+      char *s = data_out (value, dict_get_encoding (dict), &v->print);
       ds_put_cstr (str, s);
       free (s);
     }