+ assert (fmt_check_output (format));
+ if (format->type == FMT_A)
+ {
+ char *in = CHAR_CAST (char *, value_str (input, format->w));
+ return recode_string_pool (UTF8, encoding, in, format->w, pool);
+ }
+ else if (fmt_get_category (format->type) == FMT_CAT_BINARY)
+ {
+ char tmp[16];
+
+ assert (format->w + 1 <= sizeof tmp);
+ converters[format->type] (input, format, tmp);
+ return binary_to_utf8 (tmp, pool);
+ }
+ else
+ {
+ const struct fmt_number_style *style = settings_get_style (format->type);
+ size_t size = format->w + style->extra_bytes + 1;
+ char *output;
+
+ output = pool_alloc_unaligned (pool, size);
+ converters[format->type] (input, format, output);
+ return output;
+ }
+}
+
+char *
+data_out (const union value *input, const char *encoding, const struct fmt_spec *format)
+{
+ return data_out_pool (input, encoding, format, NULL);