- if (encoding == LEGACY_NATIVE
- || fmt_get_category (format) & (FMT_CAT_BINARY | FMT_CAT_STRING))
- {
- i.input = input;
- i.encoding = encoding;
- }
- else
- {
- ss_alloc_uninit (&i.input, ss_length (input));
- legacy_recode (encoding, ss_data (input), LEGACY_NATIVE,
- ss_data (i.input), ss_length (input));
- i.encoding = LEGACY_NATIVE;
- copy = ss_data (i.input);
- }