- data_in (ss_head (s, f->w), LEGACY_NATIVE, f->type, f->d, 0, 0, NULL, &out, 0);
+ char *error;
+
+ if (s.length > f->w)
+ s.length = f->w;
+ error = data_in (s, C_ENCODING, f->type, &out, 0, NULL);
+ if (error == NULL)
+ data_in_imply_decimals (s, C_ENCODING, f->type, f->d, &out);
+ else
+ {
+ msg (SE, "Cannot parse `%.*s' as format %s: %s",
+ (int) s.length, s.string, fmt_name (f->type), error);
+ free (error);
+ }