Bug 691657 - ps2epsi uses \r instead of \n
Summary: ps2epsi uses \r instead of \n
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.71
Hardware: PC Linux
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 16:06 UTC by Tim Waugh
Modified: 2010-10-01 09:21 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
ghostscript-ps2epsi-cr.patch (683 bytes, application/octet-stream)
2010-09-30 16:06 UTC, Tim Waugh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Waugh 2010-09-30 16:06:46 UTC
Created attachment 6767 [details]
ghostscript-ps2epsi-cr.patch

ps2epsi writes a carriage return instead of a newline after the BoundingBox and HiResBoundingBox comments.  Patch attached.
Comment 1 Tim Waugh 2010-09-30 16:11:08 UTC
Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=635786
Comment 2 Ray Johnston 2010-09-30 16:40:19 UTC
While unix folks may think this is wrong, it is not.

Macintosh pioneered the use of PS with the Apple Laserwriter and used \r
as the line end.

Since different systems use different line endings, Adobe wisely allows
ANY line ending: \r   \r\n    \n
as equivalent.

Adobe's DSC comment section says:
---------------------------------------------------------------------------
Line Endings.

Lines must be terminated with one of the following combinations of
characters: CR, LF, or CR LF. CR is the carriage-return character and LF is
the line-feed character (decimal ASCII 13 and 10, respectively).
---------------------------------------------------------------------------

Thus this bug report is bogus.
Comment 3 Tim Waugh 2010-10-01 09:21:45 UTC
New line characters are used elsewhere in ps2epsi.ps, so isn't it just more consistent to use the same line ending throughout?  Otherwise it just seems like being deliberately unexpected just because the standard says it's allowed.