Convert to utf8 in data_out function.
[pspp-builds.git] / src / language / expressions / operations.def
index 2d31bd47182dcb158d9f9c50e644fb03bb7b07bf..d78827a8da8aaf933dc3d6fc2be09774ba39b9f7 100644 (file)
@@ -582,11 +582,15 @@ absorb_miss string function STRING (x, no_format f)
 {
   union value v;
   struct substring dst;
+  char *s;
 
   v.f = x;
-  dst = alloc_string (e, f->w);
+
   assert (!fmt_is_string (f->type));
-  data_out (&v, f, dst.string);
+  s = data_out (&v, "no-such-encoding", f);
+  dst = alloc_string (e, strlen (s));
+  strcpy (dst.string, s);
+  free (s);
   return dst;
 }