[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PSPP-BUG: [bug #41852] Exporting sav-Files to csv: Dos linebreaks in tab
From: |
Andre Müller |
Subject: |
PSPP-BUG: [bug #41852] Exporting sav-Files to csv: Dos linebreaks in table cells are exported (unchanged). |
Date: |
Thu, 13 Mar 2014 13:15:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 |
URL:
<http://savannah.gnu.org/bugs/?41852>
Summary: Exporting sav-Files to csv: Dos linebreaks in table
cells are exported (unchanged).
Project: PSPP
Submitted by: andrem
Submitted on: Thu 13 Mar 2014 01:15:39 PM GMT
Category: Output Driver
Severity: 5 - Average
Status: None
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: None
Effort: 0.00
_______________________________________________________
Details:
SPSS sav files may contain line breaks as cell content.
When exporting to .csv, these are exported "as is",
that is I find DOS line breaks (CR-LF) in Table cells,
even though the table itself is written to linux file
format (only LF as line breaks).
The export is done using
GET FILE="source.sav"
SAVE TRANSLATE
/TYPE=TAB
/FIELDNAMES
/OUTFILE="pspp_out.csv"
An example file can be downloaded from (needs registration):
https://dbk.gesis.org/dbksearch/download.asp?db=D&id=35706
The file's third row contains a Dos line break:
<foo> "FRAGEBOGEN GEMEINSAM MIT MEINER MUTTER AUSGEFÜLLT, DA ICH EINIGE
FRAGEN OHNE IHRE UNTERSTÜTZUNG NICHT HÄTTE BEANTWORTEN KÖNNEN. Z.B.
WOHNUNG^M
" <bar>
A newline is introduced, and a ^M denoting a carriage return is
trailing at the end of line.
All instances of cells containing line breaks I encountered are actually
cut-and-paste accidents, none of them serves a layout purpose.
In my opinion, the export to csv should not export the line breaks at all, as
it screws up the table geometry (one line per case containing all columns).
Handling the csv with the
standard unix tools (cut, paste, grep..) will not work as expected. But that
really is just my opinion :-)
If the line breaks _are_ exported, they should match the current file
encoding, though. So in this case, Unix line feeds should be written instead
of DOS ones.
I post this bug following up on my inquiry to pspp bugs mailing list of
2014-03-12, with the subject "PSPP-BUG: DOS Linebreaks in Table Cells:
Intentionally exported?"
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41852>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- PSPP-BUG: [bug #41852] Exporting sav-Files to csv: Dos linebreaks in table cells are exported (unchanged).,
Andre Müller <=