Issue 128548 - Last CSV line is silently lost on import if last field is quoted and EOF is reached before closing quote
Summary: Last CSV line is silently lost on import if last field is quoted and EOF is r...
Status: RESOLVED FIXED
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: 4.1.14
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: ms_interoperability
Depends on:
Blocks:
 
Reported: 2022-12-27 05:48 UTC by damjan
Modified: 2022-12-29 18:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.13
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description damjan 2022-12-27 05:48:32 UTC
Excel basically allows:
a,"b<EOF>
and parses it as:
a,b

We lose that whole line.

Please Apache commons-csv issue https://issues.apache.org/jira/browse/CSV-141 for details and the fix for commons-csv.
Comment 1 damjan 2022-12-27 12:54:02 UTC
Fixed by c7ace38fedbe61bc12c11cf4f428626429620f06

Resolving FIXED.
Comment 2 Matthias Seidel 2022-12-27 15:32:14 UTC
Since this is Target Milestone 4.2.0, cherry-picked for AOO42X with:
https://github.com/apache/openoffice/commit/783073635d90a1975acc92f88b2b9c049e9b617a

Would this also be applicable for AOO41X?
Comment 3 damjan 2022-12-27 17:55:33 UTC
(In reply to Matthias Seidel from comment #2)
> Since this is Target Milestone 4.2.0, cherry-picked for AOO42X with:
> https://github.com/apache/openoffice/commit/
> 783073635d90a1975acc92f88b2b9c049e9b617a
> 
> Would this also be applicable for AOO41X?

It's hard to tell, the code is quite different. Test it?
Comment 4 Matthias Seidel 2022-12-29 18:05:53 UTC
Cherry-picked for AOO41X with:
https://github.com/apache/openoffice/commit/36795fb31b6150980d77ebea85aeae4434a29853