-
-
Notifications
You must be signed in to change notification settings - Fork 407
1.50: encoding rule is ignored when csv rules file is input file #2465
Copy link
Copy link
Closed
Labels
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.Something wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.Affects potentially a significant number of users.annoyance4-majorMajor usability/doc bug, or any regression or crash.Major usability/doc bug, or any regression or crash.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.i18nInternationalisation/localisation-related.Internationalisation/localisation-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.A backwards step, indicating a weakness in our QA. We don't like these.
Description
Metadata
Metadata
Assignees
Labels
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.Something wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.Affects potentially a significant number of users.annoyance4-majorMajor usability/doc bug, or any regression or crash.Major usability/doc bug, or any regression or crash.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.i18nInternationalisation/localisation-related.Internationalisation/localisation-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.A backwards step, indicating a weakness in our QA. We don't like these.
hledger 1.50.1, linux-x86_64 on Ubuntu 22.04.5 LTS
Trying to
hledger import csv.comdirectGiro.rules --dryresults in
Same with
hledger -f csv.comdirectGiro.rules print.In contrast to that, doing the same with version 1.43.2
~/hledger-linux-x64/hledger import csv.comdirectGiro.rules --dryresults as expected in
The rules file sets the encoding explicitly to iso-8859-15. Contents of csv.comdirectGiro.rules:
locale
The error message of 1.50.1 "cannot decode byte sequence starting from 228" looks misleading to me as in file umsaetze_XXXXXXXXXX_20250924-0909.csv, there are only ASCII characters on and around position 228. The file contains some German characters äÜü, but on positions way before and way after position 228.
Furthermore, it is not understandable why hledger seemingly tries to decode the file as UTF-8 ("Some text could not be decoded with the system text encoding, UTF-8.") as the rules files sets the encoding explicitly to iso-8859-15.