Bug 116811

Summary: CSV file with 00 (NUL) bytes does not import as multiple lines
Product: LibreOffice Reporter: Tim Richardson <tim>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: 79045_79045, jumbo4444
Priority: medium    
Version: 5.2.7.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 109236    
Attachments: example csv
excel's rewrite of the CSV file, which now imports in LO
00 bytes replaced

Description Tim Richardson 2018-04-05 03:33:46 UTC
Created attachment 141103 [details]
example csv

The attached is a csv file generated from an old dos app. It is CSV but it imports into LibreOffice as one line, the newlines are not being recognised.
Comment 1 Tim Richardson 2018-04-05 03:56:21 UTC
Note, this file can be imported successfully by Excel. After saving it as csv in Excel, it works. Excel strips out all the 00 byte values, perhaps they are confusing LibreOffice?
Comment 2 Tim Richardson 2018-04-05 04:00:08 UTC
Created attachment 141104 [details]
excel's rewrite of the CSV file, which now imports in LO

This attachment is the csv generated after importing the original file in Excel and saving it again. The quoting of text fields has changed, but it is the 00 bytes which cause the problem
Comment 3 Tim Richardson 2018-04-05 04:01:09 UTC
Created attachment 141105 [details]
00 bytes replaced

I used a hexeditor to replace the 00 bytes with 0x20
Now it imports into LO. So the 00 bytes are definitely the problem.
Comment 4 Laurent Balland 2018-04-14 16:19:15 UTC
I CAN reproduce with:
- Version: 5.4.7.1
Build ID: ef425abf896c652d177000096228d1dbcfe9c7af
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
- Version: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
Threads CPU : 8; Version de l'OS :Linux 4.13; UI Render : par défaut; VCL : gtk2; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 5 QA Administrators 2021-02-04 04:25:46 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2021-02-22 17:55:02 UTC
LO Calc opens that example CSV with three rows if you select ' instead " in "String delimiter" drop-down list in "Text Import" dialog.

I think we can close it as WFM.