- if (var_is_numeric (var))
- sys_warn (r, record->pos,
- _("Duplicate value label for %g on %s."),
- value.f, var_get_name (var));
+ if (r->written_by_readstat)
+ {
+ /* Ignore the problem. ReadStat is buggy and emits value
+ labels whose values are longer than string variables'
+ widths, that are identical in the actual width of the
+ variable, e.g. both values "ABC123" and "ABC456" for a
+ string variable with width 3. */
+ }
+ else if (var_is_numeric (var))
+ value_label_warning (r, record->pos, n_label_warnings,
+ _("Duplicate value label for %g on %s."),
+ value.f, var_get_name (var));