bugGNU troff - Bugs: bug #55335, preconv produces CR CR LF...


bug #55335: preconv produces CR CR LF end-of-line on MS-Windows

Submitted by:  Eli Zaretskii <eliz>
Submitted on:  Sun 30 Dec 2018 03:49:50 PM UTC  
Category:  Preprocessor preconv Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

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


Sun 30 Dec 2018 03:49:50 PM UTC, original submission:  

When compiled for MS-Windows, preconv reads its input in binary mode, thus leaving the CR characters of the CR LF end-of-line marker unconverted to the Unix LF-only format.  However, the output is written in the default text mode, which adds another CR before LF, thus producing files with an extra CR.  This causes pic (and possibly other preprocessors) to complain about "invalid input character code 13".

The solution is to switch stdout to binary mode when needed.  The proposed patch is in the attachment.

Eli Zaretskii <eliz>


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

Attach Files:

Attached Files
file #45793:  preconv_binary.dif added by eliz (613B - application/vnd.ms-excel)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by eliz (Submitted the item)

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

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-30 eliz Attached File- => Added preconv_binary.dif, #45793

    Back to the top

    Powered by Savane 3.5