On Mon, 22 Jul 2024, Simon Michael wrote:
> On Mon, Jul 22, 2024, at 06:16, Henning Thielemann wrote:
>
>> I wonder, why CvsUtils is in directory Read because it only contains
>> 'print' functions.
>
> Good point. It is only used by Hledger.Cli.Commands.* except for CsvRecord which is used in RulesReader, feel free to move it.
ok
>> Then I think I prefer to actually generate multiple output columns in
>> "single column" balance mode, one for each currency. I assume, that
>> cell contents like "10 EUR, 20 USD" can hardly be processed by formulas
>> in spreadsheet processors and it is also not a good idea, say, to
>> compute a sum of a column that contains both EUR and USD numbers.
>
> Have you seen the balance command's tall and bare modes (a row for each
> currency) and tidy mode (row per data point) ?
>
https://hledger.org/dev/hledger.html#balance-report-layout
I have not found those options, but it seems the layout I like is still
missing. I want to get:
account balance
EUR USD
bla 10 20
foo 20
bar 10
FODS also allows to merge cells, such that 'balance' spans both EUR and
USD columns.
>> Advantages of FODS over CSV are: Character encoding is specified in XML
>> header, numbers can be separated from currencies, so you can
>> immediately use the numbers for computation but you also see the
>> currencies in the GUI, we can pin the header row.
>
> Do you need to work with non-UTF-8 encodings ?
My journals are in Latin-1 or Latin-9 (that is, Latin with Euro symbol).
When I run
$ LANG=de_DE hledger -f my-journal balance
then both input and output are in Latin encoding.