bugPSPP - Bugs: bug #40223, save translate type=csv ignores...

 
 

bug #40223: save translate type=csv ignores crlf settings

Submitted by:  None
Submitted on:  Wed 09 Oct 2013 06:25:29 PM UTC  
 
Category: Output DriverSeverity: 5 - Average
Status: NoneAssigned to: None
Open/Closed: OpenRelease: None
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 09 Oct 2013 06:25:29 PM UTC, original submission:

Bug:
SAVE TRANSLATE /TYPE=CSV always output LF as line end

Expected:
It must be FILE HANDLE /ENDS={value} or CRLF on Windows by default

Suggested fix:

Instead of putc('\n');
in csv-file-writer.c / csv_write_case()
and csv-file-writer.c / write_var_names()

must be same logic as in
data-writer.c/dfm_put_record()
case FH_MODE_TEXT:

something like:
if (w->opts->line_ends == FH_END_CRLF)...

Of course, w->opts must have line_ends initialized in csv_writer_options_init().

Workaround:

Use WRITE instead of SAVE TRANSLATED until problem fixed. WRITE works as expected.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup