X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fdata-list.c;h=4fea7a407038364aca731376c6c86d11d9e66caf;hb=d0371553a98cd169353bf6d211e375e5ffc3a3bd;hp=3ee524d5b80001b7ad7e7c81eb3e0d206f5dd48b;hpb=1881aaf56cd19765028c365e11ec0c97cc9d0320;p=pspp-builds.git diff --git a/src/language/data-io/data-list.c b/src/language/data-io/data-list.c index 3ee524d5..4fea7a40 100644 --- a/src/language/data-io/data-list.c +++ b/src/language/data-io/data-list.c @@ -673,6 +673,7 @@ read_from_data_list (const struct data_list_pgm *dls, struct ccase *c) static bool read_from_data_list_fixed (const struct data_list_pgm *dls, struct ccase *c) { + enum legacy_encoding encoding = dfm_reader_get_legacy_encoding (dls->reader); struct dls_var_spec *spec; int row; @@ -698,9 +699,10 @@ read_from_data_list_fixed (const struct data_list_pgm *dls, struct ccase *c) if (row < spec->record) break; - data_in (ss_substr (line, spec->first_column - 1, spec->input.w), - spec->input.type, spec->input.d, spec->first_column, - case_data_rw_idx (c, spec->fv), + data_in (ss_substr (line, spec->first_column - 1, + spec->input.w), + encoding, spec->input.type, spec->input.d, + spec->first_column, case_data_rw_idx (c, spec->fv), fmt_var_width (&spec->input)); } @@ -716,6 +718,7 @@ read_from_data_list_fixed (const struct data_list_pgm *dls, struct ccase *c) static bool read_from_data_list_free (const struct data_list_pgm *dls, struct ccase *c) { + enum legacy_encoding encoding = dfm_reader_get_legacy_encoding (dls->reader); struct dls_var_spec *spec; ll_for_each (spec, struct dls_var_spec, ll, &dls->specs) @@ -736,7 +739,7 @@ read_from_data_list_free (const struct data_list_pgm *dls, struct ccase *c) } } - data_in (field, spec->input.type, 0, + data_in (field, encoding, spec->input.type, 0, dfm_get_column (dls->reader, ss_data (field)), case_data_rw_idx (c, spec->fv), fmt_var_width (&spec->input)); } @@ -749,6 +752,7 @@ read_from_data_list_free (const struct data_list_pgm *dls, struct ccase *c) static bool read_from_data_list_list (const struct data_list_pgm *dls, struct ccase *c) { + enum legacy_encoding encoding = dfm_reader_get_legacy_encoding (dls->reader); struct dls_var_spec *spec; if (dfm_eof (dls->reader)) @@ -776,7 +780,7 @@ read_from_data_list_list (const struct data_list_pgm *dls, struct ccase *c) break; } - data_in (field, spec->input.type, 0, + data_in (field, encoding, spec->input.type, 0, dfm_get_column (dls->reader, ss_data (field)), case_data_rw_idx (c, spec->fv), fmt_var_width (&spec->input)); }