Bug 142395 - FILEOPEN CSV: Space trailing values imported as garbage
Summary: FILEOPEN CSV: Space trailing values imported as garbage
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.2.0 target:7.1.5
Keywords:
: 136013 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-20 12:19 UTC by fabio
Modified: 2021-08-29 20:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Small file that shows the described problem (33 bytes, text/plain)
2021-05-20 12:21 UTC, fabio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fabio 2021-05-20 12:19:37 UTC
Description:

Importing a CSV file, the last cell in lines that ending in ", " is imported as garbage (random characters that change with each attempt) instead of consisting of a single space.


Steps to Reproduce:
1. Open CSV file (containing lines that end in ", ");
2. In the "Text Import" dialog chose "Separated by | Comma";
3. Finish importing and look at the last value in each line.

Actual Results:
The last cell for every line that ends in ", " in the CSV contains random characters.


Expected Results:
The last cell for every line that ends in ", " in the CSV should contain only a space character.



Reproducible: Always


User Profile Reset: No



Additional Info:
This problem already existed in LibreOffice 6 versions.
Comment 1 fabio 2021-05-20 12:21:26 UTC
Created attachment 172199 [details]
Small file that shows the described problem
Comment 2 Mike Kaganski 2021-05-20 12:38:14 UTC
Can't repro using Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: threaded
Comment 3 [REDACTED] 2021-05-20 12:57:09 UTC
No repro

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 [REDACTED] 2021-05-20 12:59:43 UTC
(In reply to fabio from comment #0)
 
> Additional Info:
> This problem already existed in LibreOffice 6 versions.

> User Profile Reset: No

I'd suggest to try in safe mode or to reset user profile
Comment 5 fabio 2021-05-20 13:43:19 UTC
Resetting the user profile did not fix the issue but helped me notice there is another condition for it to happen: "String delimiter" must be empty. If quotes or any other character are used as "String delimiter" the problem does no occur.

Thanks for your prompt answers.
Comment 6 Mike Kaganski 2021-05-20 15:31:11 UTC
(In reply to fabio from comment #5)

Repro.

(A sidenote: when replying to a NEEDINFO, please set status back to UNCONFIRMED, not to REOPENED :-))
Comment 7 fabio 2021-05-20 15:37:37 UTC
(In reply to Mike Kaganski from comment #6)
> (A sidenote: when replying to a NEEDINFO, please set status back to
> UNCONFIRMED, not to REOPENED :-))

Thanks for the tip. It's the first time I'm using Bugzilla.
Comment 8 Mike Kaganski 2021-05-20 22:09:26 UTC
https://gerrit.libreoffice.org/c/core/+/115839
Comment 9 Commit Notification 2021-05-21 04:11:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6155689bb6f1d72f29b43ac5ae94b32522ef9b42

tdf#142395: properly handle "no string delimiter" case

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2021-05-22 06:33:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/c55f64f1f4bcd37f071225c8fedca4265f2a59e3

tdf#142395: properly handle "no string delimiter" case

It will be available in 7.1.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2021-05-22 15:23:08 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f4a9dcc471f5cefb2c16e104a270339afa88b4d7

tdf#142395: sc: Add UItest

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 fabio 2021-08-06 12:01:01 UTC
Just confirmed the issue is solved in 7.1.5 as expected.

Thank you once again for your work.
Comment 13 Eike Rathke 2021-08-29 20:57:12 UTC
*** Bug 136013 has been marked as a duplicate of this bug. ***