Details
-
Story
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
-
ERM Sprint 100, ERM Sprint 101
-
Bienenvolk
Description
When exporting licenses as CSV any quote characters inside a field should be escaped with an additional quote character (ASCII 34) rather than the backslash (ASCII 92).
i.e. text such as:
vgl. 7.6.8 "Zugelassen ist jedoch eine Verwendung der "Ariel Interlibrary Loan Software" zum Versand
should be escaped as:
vgl. 7.6.8 ""Zugelassen ist jedoch eine Verwendung der ""Ariel Interlibrary Loan Software"" zum Versand
Rather than
vgl. 7.6.8 \"Zugelassen ist jedoch eine Verwendung der \"Ariel Interlibrary Loan Software\" zum Versand
This is to ensure better compatibility when opening the resulting CSV with Excel and Google Sheets.
Note that the opencsv library version currently used is com.opencsv:opencsv:4.6 which uses the backslash (ASCII 92) as DEFAULT_ESCAPE_CHARACTER while the latest version com.opencsv:opencsv:5.2 uses the quote (ASCII 34) DEFAULT_ESCAPE_CHARACTER
The correct output can be tested as follows:
- Add new license
- Add the following text to a license term "internal note" (note that this text includes a newline as well as quote characters
vgl. 7.6.8 "Zugelassen ist jedoch eine Verwendung der "Ariel Interlibrary Loan Software" zum Versand eines Teils der Inhalte zu einem Drucker/Fax einer
Empfängerbibliothek, ein Versand an Emailadressen ist nicht gestattet. "
- Find license in search and filter results and select it with checkbox
- Choose Actions -> Export selected as CSV
- Select all then click Save & Close
- Check in CSV that the quote characters are escaped with an additional escape character
For a final check the CSV can be opened in Excel and/or uploaded to Google Drive and opened with Google Sheets and checked that the text appears in the appropriate column.