projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert to utf8 in data_out function.
[pspp-builds.git]
/
src
/
data
/
variable.c
diff --git
a/src/data/variable.c
b/src/data/variable.c
index 8d85b518a5f8325dbef9c257e8af20d2ca21ab3a..0b5ca26c977236aff6992806a92a1a5a6adc6bc7 100644
(file)
--- a/
src/data/variable.c
+++ b/
src/data/variable.c
@@
-590,10
+590,12
@@
var_append_value_name (const struct variable *v, const union value *value,
struct string *str)
{
const char *name = var_lookup_value_label (v, 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)
{
if (name == NULL)
{
- char *s = ds_put_uninit (str, v->print.w);
- data_out (value, &v->print, s);
+ char *s = data_out (value, dict_get_encoding (dict), &v->print);
+ ds_put_cstr (str, s);
+ free (s);
}
else
ds_put_cstr (str, name);
}
else
ds_put_cstr (str, name);