X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=ff750b25f7aa6ffe3b6a99e55a2d014791bcf5d8;hb=41c45ec6bc320abc0eed650ed183b604a5f5befd;hp=bec6716689a9501561ced5fe0edcdb4451fd6b01;hpb=f15c854d8500105766b2f5666bb62b983ff24f88;p=pspp diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index bec6716689..ff750b25f7 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -49,11 +49,11 @@ /* Formats a value according to FORMAT The returned string must be freed when no longer required */ gchar * -value_to_text (union value v, struct fmt_spec format) +value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format) { gchar *s = 0; - s = data_out (&v, &format); + s = data_out (&v, dict_get_encoding (dict->dict), &format); g_strchug (s); return s; @@ -63,6 +63,7 @@ value_to_text (union value v, struct fmt_spec format) gboolean text_to_value (const gchar *text, union value *v, + const PsppireDict *dict, struct fmt_spec format) { bool ok; @@ -85,7 +86,8 @@ text_to_value (const gchar *text, union value *v, } msg_disable (); - ok = data_in (ss_cstr (text), LEGACY_NATIVE, format.type, 0, 0, 0, + ok = data_in (ss_cstr (text), UTF8, format.type, 0, 0, 0, + dict->dict, v, fmt_var_width (&format)); msg_enable ();