+ tab_output_text (TAB_FIX, ds_cstr (&line->s) + 1);
+ else
+ {
+ size_t len = ds_length (&line->s);
+ char *s = ds_cstr (&line->s);
+
+ if (!trns->include_prefix)
+ {
+ s++;
+ len--;
+ }
+
+ if (is_encoding_utf8 (trns->encoding))
+ dfm_put_record (trns->writer, s, len);
+ else
+ {
+ char *recoded = recode_string (trns->encoding, UTF8, s, len);
+ dfm_put_record (trns->writer, recoded, strlen (recoded));
+ free (recoded);
+ }
+ }
+ }
+}
+\f
+/* Transformation, for output involving binary. */
+
+static void print_binary_flush_records (struct print_trns *,
+ struct string *line, int target_record,
+ bool *eject, int *record);
+
+/* Performs the transformation inside print_trns T on case C. */
+static int
+print_binary_trns_proc (void *trns_, struct ccase **c,
+ casenumber case_num UNUSED)
+{
+ struct print_trns *trns = trns_;
+ bool eject = trns->eject;
+ char encoded_space = recode_byte (trns->encoding, C_ENCODING, ' ');
+ int record = 1;
+ struct prt_out_spec *spec;
+ struct string line;
+
+ ds_init_empty (&line);
+ ds_put_byte (&line, ' ');
+ ll_for_each (spec, struct prt_out_spec, ll, &trns->specs)
+ {
+ print_binary_flush_records (trns, &line, spec->record, &eject, &record);
+
+ ds_set_length (&line, spec->first_column, encoded_space);
+ if (spec->type == PRT_VAR)
+ {
+ const union value *input = case_data (*c, spec->var);
+ if (!spec->sysmis_as_spaces || input->f != SYSMIS)
+ data_out_recode (input, var_get_encoding (spec->var),
+ &spec->format, &line, trns->encoding);
+ else
+ ds_put_byte_multiple (&line, encoded_space, spec->format.w);
+ if (spec->add_space)
+ ds_put_byte (&line, encoded_space);
+ }