Re: DOS Newline Character
From: Roger Leigh (${roger}_at_invalid.whinlatter.uklinux.net.invalid)
Date: 11/23/04
- Next message: john bailo: "Re: Linux server help"
- Previous message: foamy: "Re: Linux server help"
- In reply to: Lew Pitcher: "Re: DOS Newline Character"
- Next in thread: Lew Pitcher: "Re: DOS Newline Character"
- Reply: Lew Pitcher: "Re: DOS Newline Character"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Nov 2004 22:02:27 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lew Pitcher <Lew.Pitcher@td.com> writes:
> Roger Leigh wrote:
> [snip]
>> Summary: CR/LF or CR or LF (or whatever your system uses) are merely
>> line-end markers. They don't directly correspond to any mechanical
>> operations, which are entirely hardware-dependent.
>
> Funny, the ECMA and ISO standards and my old ASR33 teletypewriter would
> disagree with you on this.
That's true, but not all devices support those standards (ECMA-48 ?)
> Your ESC/P printer seems to act otherwise, although I believe (because
> of my own use of an ESC/P printer) that you are incorrect in your
> assertions about the ESC/P interpretation of the characters. Certainly,
> on my Epson LQ-570 printer, with the "CR/LF" switch set to require both
> carriage returns and line feeds, a 0x0d causes printing to resume at the
> left margin of the current line, and 0x0a causes printing to resume at
> the current column of the next line.
You are correct. My assertion was from memory; double-checking with
the ESC/P2 reference:
CR: "Moves the print position to the left-margin position" (and
flushes the line buffer)
LF: "Advances the vertical print position one line" and
"Moves the print position to the left-margin position"
(and flushes the line buffer on 9-pin ESC/P printers only)
ESC <: same as for CR, but additionally forces printing from the
left-hand margin (i.e. unidirectionally; the default it
b idirectional printing, so CR doesn't imply homing the head).
So it's not totally in agreement with ECMA-48: LF includes an implicit
CR, effectively making CR/LF redundant and transparently compatible
with UNIX line endings as a happy side-effect.
(I think the reference doesn't tell the full story WRT the DIP
settings: I've certainly had my 9-pin printers stair-step, which the
reference implies cannot happen, but this isn't the case with current
24-pin, inkjet and laser implementations of ESC/P2).
- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFBo7NyVcFcaSW/uEgRAkQPAJ0YO/lML2WLYoA3n1G2xpQt6CBXqACeNMmE
27oah4NzMpe8vMpZPMbNPXY=
=1FDr
-----END PGP SIGNATURE-----
- Next message: john bailo: "Re: Linux server help"
- Previous message: foamy: "Re: Linux server help"
- In reply to: Lew Pitcher: "Re: DOS Newline Character"
- Next in thread: Lew Pitcher: "Re: DOS Newline Character"
- Reply: Lew Pitcher: "Re: DOS Newline Character"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|