I have opened pull request 2168 <https://github.com/ledger/ledger/pull/2168> to fix this. An earlier change wrote the new function "quoted_rfc4180", but that doesn't work for the simple but goofy reason that the Ledger expression parser considers that to be an amount (with quantity 4180 and commodity symbol "quoted_rfc").
On Wednesday, November 9, 2016 at 7:41:51 PM UTC-8 Gina White wrote: > I found the code where fn_quoted lives and can imagine adding something > called fn_quoted_rfc4180, based on that. Does that seem like a good change? > > - Gina > > On Wed, Nov 9, 2016 at 4:53 PM Gina White <[email protected]> wrote: > >> Hi ledger folk, >> >> I would like to import ledger data into my go program. It looks like csv >> gets me pretty close, but I am running into a problem with how escaping is >> done. >> >> The go stdlib csv implementation is based on rfc 4180, which says that >> for double quotes to appear inside a field, they should be escaped with >> another double-quote i.e. >> >> "field 1","this is ""another"" field" >> >> but the csv that ledger is outputting escapes things like this: >> >> "field 1","this is \"another\" field" >> >> Is there a reasonable way to convince ledger to escape things according >> to rfc 4180? Is there maybe another path besides csv I should be looking >> at? >> >> thanks >> - Gina >> > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/1327b473-cbb6-444e-b409-e8681e3eab48n%40googlegroups.com.
