- ENCODING, according to FORMAT. Stores the parsed
- representation in OUTPUT, which the caller must have
- initialized with the given WIDTH (0 for a numeric field,
- otherwise the string width).
- Iff FORMAT is a string format, then DICT must be a pointer
- to the dictionary associated with OUTPUT. Otherwise, DICT
- may be null.
-
- If no decimal point is included in a numeric format, then
- IMPLIED_DECIMALS decimal places are implied. Specify 0 if no
- decimal places should be implied.
-
- If FIRST_COLUMN and LAST_COLUMN are nonzero, then they should
- be the 1-based column number of the first and
- one-past-the-last-character in INPUT, for use in error
- messages. (LAST_COLUMN cannot always be calculated from
- FIRST_COLUMN plus the length of the input because of the
- possibility of escaped quotes in strings, etc.) */
-bool
-data_in (struct substring input, const char *encoding,
- enum fmt_type format, int implied_decimals,
- int first_column, int last_column,
- const struct dictionary *dict,
- union value *output, int width)
+ INPUT_ENCODING, according to FORMAT.
+
+ Stores the parsed representation in OUTPUT, which the caller must have
+ initialized with the given WIDTH (0 for a numeric field, otherwise the
+ string width). If FORMAT is FMT_A, then OUTPUT_ENCODING must specify the
+ correct encoding for OUTPUT (normally obtained via dict_get_encoding()). */
+char *
+data_in (struct substring input, const char *input_encoding,
+ enum fmt_type format,
+ union value *output, int width, const char *output_encoding)