[GNC] Bugzilla account request
David Cousens
davidcousens49 at gmail.com
Sat Jun 6 23:50:24 EDT 2026
Tom,
I did look at RFC4180. The relevant section and only mention of
backslash is
"General
Several relatively common variations from the strict form specified by
RFC 4180 are found and may be supported by software tools such as those
listed below as Useful References:
In locales where the comma character is used in place of a decimal
point in numbers, the separator between fields/columns is often a
semicolon.
The line break character may be CR or LF, not necessarily CRLF.
Some Unix-based applications may use a different escape mechanism for
indicating that one of the separator characters occurs within a text
value. The individual character is preceded by a backslash character
rather than enclosing the entire string in double quotes.
Single quotes may be treated as equivalent to double-quotes for
escaping (also known as "text-qualification").
Several other caveats are worth noting:
The last record in a file may or may not end with a line break
character.
Non-printable characters may be included in text fields by using one of
several c-style character escape sequences: \### or \o### Octal; \x##
Hex; \d### Decimal; and \u#### Unicode.
The treatment of whitespace adjacent to field and record separators
varies among applications. If whitespace at the beginning and end of a
textual field value is significant, the text string should be text-
qualified, i.e. enclosed in quotes.
In some uses, there is an assumption of strong data typing, with
unquoted fields considered to be numeric, and quoted fields considered
to be text data. "
which means that Microsoft Excel. Apple's Numbers,
LibreOffice and Google Sheets and BoAwho implement the backslash as an
escape character which is not part of the official RFC4180 definition
i.e. GnuCash is actually compliant with RFC4180.
I do however agree that it would be useful to include parsing the
backslash escape to become able to read files non-compliant with
RFC4180 which include the backslash as an escape character.
I am not sure at this point whether the GnuCash code uses an external
library for CSV decoding or not. If it does, it would be simpler to
request a change to that library rather than modify the GnuCash code.
Geert who wrote the CSV importer may be able to advise on which route
is more appropriate as i don't remember coming across a csv library but
it has beeen many years since I looked at the code in this area.
David
On Sat, 2026-06-06 at 21:29 -0400, Tom Teixeira wrote:
> Look at RFC 4180 which is the "official" definition of CSV format.
> Bank
> of America is producing CSV files that are consistent with the RFC,
> and
> can also be read directly by Microsoft Excel. Apple's Numbers,
> LibreOffice and Google Sheets all handle this CSV file without
> problems,
> so I believe it is a Gnucash bug, not a Bank of America bug.
>
> On 6/6/26 7:44 PM, David Cousens wrote:
> > BoA problem not GnuCash problem.
> >
> > On Sat, 2026-06-06 at 09:56 -0400, Tom Teixeira wrote:
> > > I would like a bugzilla account. I have encountered a bug with
> > > CSV
> > > files
> > > from Bank of America sometimes having embedded backslashes that
> > > do
> > > not
> > > import properly. I work around the problem by editing the CSV
> > > file
> > > before importing, but did investigate and found RFC 4180 does not
> > > allow
> > > use of backslash as a quote character. I want to submit a formal
> > > bug
> > > and
> > > may be able to construct a patch to fix the bug.
> > >
> > > _______________________________________________
> > > gnucash-user mailing list
> > > gnucash-user at gnucash.org
> > > To update your subscription preferences or to unsubscribe:
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > -----
> > > Please remember to CC this list on all your replies.
> > > You can do this by using Reply-To-List or Reply-All.
>
>
--
David Cousens
More information about the gnucash-user
mailing list