fix:check accounts: don't garble non-ascii account names in errors [#2469]

This regressed in 1.27 or so.
This commit is contained in:
Simon Michael 2025-10-01 14:40:08 -10:00
parent bde323b311
commit 215ef5e12d
3 changed files with 6 additions and 6 deletions

View File

@ -63,11 +63,11 @@ journalCheckAccounts j = mapM_ checkacct (journalPostings j)
"%s:%d:"
,"%s"
,"Strict account checking is enabled, and"
,"account %s has not been declared."
,"account \"%s\" has not been declared."
,"Consider adding an account directive. Examples:"
,""
,"account %s"
]) f l ex (show a) a
]) f l ex a a
where
(f,l,_mcols,ex) = makePostingAccountErrorExcerpt p

View File

@ -1,4 +1,4 @@
#!/usr/bin/env -S hledger check accounts -f
2022/1/1
(a) 1
(ß) 1

View File

@ -1,13 +1,13 @@
$$$ hledger check accounts -f accounts.j
>>>2 /Error: .*accounts.j:4:
\| 2022-01-01
4 \| \(a\) 1
4 \| \(ß\) 1
\| \^
Strict account checking is enabled, and
account "a" has not been declared.
account "ß" has not been declared.
Consider adding an account directive. Examples:
account a
account ß
/
>>>= 1