Bug 395047 - Exported csv file from categories does not follow RFC 4180 standard
Summary: Exported csv file from categories does not follow RFC 4180 standard
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: exporter (show other bugs)
Version: 4.7.0
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-05 08:51 UTC by Ralf Habacker
Modified: 2021-08-06 06:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
test file (31.77 KB, text/xml)
2018-06-05 08:51 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2018-06-05 08:51:31 UTC
Created attachment 113087 [details]
test file

How to reproduce:
1. Open appended kmymoney file
2. Choose file->export->csv
3. Choose output file
4. Choose type "categories"
5. Choose account "girokonto"
6. select ',' as delimiter
7. start export

What happens ?
The exporter generates a csv file with the following content:
interest,I
income,I
income,subincome,I
fees,E
expense,E
expense,subexpense,E

What is expected ?
RFC 4180 standard for csv files (see https://en.wikipedia.org/wiki/Comma-separated_values#RFC_4180_standard) states:
1. Each record "should" contain the same number of comma-separated fields
2. An optional header record
3. Any field may be quoted (with double quotes).
4. Fields containing a line-break, double-quote or commas should be quoted. (If they are not, the file will likely be impossible to process correctly).

Issue 3. and 4. are covered by bug 395025, issue 2 is a "nice to have feature"
Comment 1 Jack 2021-08-05 18:28:03 UTC
I think adding a header record, and assuring all rows have the same number of fields (issues 1 and 2) is a wishlist, not a bug.  "Should" is not "must" in an RFC, as far as I know.  Issues 3 and 4 were fixed per the referenced bug.  Aside from that, I do agree these should be fixed.
Comment 2 Thomas Baumgart 2021-08-06 06:49:35 UTC
To add to Jack's comment, here the definition from rfc 2119:

3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.

From https://www.ietf.org/blog/how-read-rfc/:

In practice, authors often use SHOULD and SHOULD NOT to mean “We’d like you to do this, but we know we can’t always require it.”