Skip to content

add: writing invalid decimal/digit group marks #2656

Closed

Description

@simonmichael

I'm not sure whether this is related or a different problem: with this journal file

commodity 1.000,00

account assets                                    ; type: C
account assets:Sparkasse:Giro
account expenses:Mitarbeiter:HinzKunz

2026-07-02 Gehalt
    assets:Sparkasse:Giro                      -1000
    expenses:Mitarbeiter:HinzKunz               1000

if a add a new "Gehalt" entry with hledger 1.99.3-g1a8fc8921-20260701, windows-x86_64 (I've only type "Ge<tab>" and then pressed Enter for the accounts and amounts):

To quit, enter . at a date prompt or press control-d or control-c.
Date [2026-07-02]:
Description: Gehalt
Using this similar transaction for defaults:
2026-07-02 Gehalt
    assets:Sparkasse:Giro                     -1.000,
    expenses:Mitarbeiter:HinzKunz              1.000,

Account 1 [assets:Sparkasse:Giro]:
Amount  1 [-1.000]:
Account 2 [expenses:Mitarbeiter:HinzKunz]:
Amount  2 [1.000]:
Account 3 (or . or enter to finish this transaction):
2026-07-02 Gehalt
    assets:Sparkasse:Giro                     -1.000.
    expenses:Mitarbeiter:HinzKunz              1.000.

Save this transaction to the journal ? [y]:
Saved.
Starting the next transaction (. or ctrl-D/ctrl-C to quit)

it will added in this format:

2026-07-02 Gehalt
    assets:Sparkasse:Giro                     -1.000.
    expenses:Mitarbeiter:HinzKunz              1.000.

which fails checking:

hledger.exe: Error: C:\temp\a\2026.journal:12:53:
   |
12 |     assets:Sparkasse:Giro                     -1.000.
   |                                                     ^
invalid number (invalid use of separator)

Originally posted by @tmssngr in #2645

Activity

  1. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    journalThe journal file format, and its features.
    annoyance3-blockerNew user experience or installability bug. A potential user could fail to get started.
    affects4-manyAffects potentially a significant number of users.
    on Jul 2, 2026
  2. simonmichael commented on Jul 4, 2026

    @simonmichael
    MemberAuthor

    This is a little different from #2645, but the same kind of thing. I have made it always show a decimal mark in those default amounts, if they contain digit group marks, avoiding ambiguity and misparsing. Fixed in main.

  3. simonmichael commented on Jul 4, 2026

    @simonmichael
    MemberAuthor

    (A good find, not a new bug.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.addaffects4-manyAffects potentially a significant number of users.annoyance3-blockerNew user experience or installability bug. A potential user could fail to get started.journalThe journal file format, and its features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions