Allow field delimiter as character in CSV exports

Authored by tbaumgart on Jun 5 2018, 3:33 PM.

Description

Allow field delimiter as character in CSV exports

This commit fixes all fields which may have field separators like
payee, acccount, category, memo, number and money related fields.

Additional fixes:

  • the commit also handles double quotes inside string fields according to RFC 4180

Note: The previous implementation removed single quotes from memo
fields, which is now applied to all string fields because all string
fields are formatted by the same method. If this could be removed,
please file a related request.

BUG:395025

Test Plan: compiled and exported to csv on linux

Reviewers: KMyMoney, tbaumgart

Reviewed By: tbaumgart

Subscribers: tbaumgart

Differential Revision: https://phabricator.kde.org/D13330

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

Cherry-picked from 12fa3bbffb164737c8fd0b564c5596c4933a5d35 and adjusted
for master

Details

Committed
tbaumgartJun 5 2018, 3:33 PM
Reviewer
tbaumgart
Differential Revision
D13330: Fix 'csv writer generates invalid file in case field delimiter is used in any field'
Parents
R261:11fa00ff2b8a: Try to fix build on arm
Branches
Unknown
Tags
Unknown