[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Removing CR/LF in XyWrite
- Subject: Re: Removing CR/LF in XyWrite
- From: "Olson, Timothy" timothy_olson@xxxxxxxx
- Date: Mon, 12 Oct 1998 16:03:00 -0400
While i could get the LF changed to a CR/LF, i could not, within Xywrite
by itself, change the CR/LF BACK to a LF (or CR). But I WAS able to do it
in NB using their cut to the command line command. (If i understand their
keyboard calling sequence, i think they are using a different command
engine/overlay for that than Xy.)
I've had occasion to incorporate code into a program that fixes what were
to me "masquerading" hard return characters to CR/LF. A search for these
such hard returns, which appeared on the screen as the usual
left-pointing arrow, achieved no result. And, unlike a normal hard
return, when I cursor right from it, the cursor would sit on the same
line; another cursor right and it would go to the next line.
I've fixed this via a program; I think this is the step you already have
down. Like you, I have not done it the other way around. But in testing
out my discovery/solution, it apparently works both ways. But first, a
bit of theory. As I understand it, the ASCII character number for LF is
12 (or 0A in hexadecimal); for CR it's 15 (or 0D). Contained within
XyWrite's "hard return" character are both of the above
values/characters--0D, then 0A (A look at any Xy file through a BinHex
editor bears this out).
There are a couple problems here. I don't quite understand *why* they are
this way, but nevertheless I think I understand how to get it to work.
(1) Somehow, within XyWrite, these characters masquerade as 10 and 13,
not 12 and 15. (2) For some reason (at least on my system), when trying
to enter these characters from the command line, it's invalid to enter
the characters via the R1-R9 function calls--I have to enter them via the
Help menu.
So, the solution I developed for the above-mentioned misbehaving
hard-return characters also works in reverse: You do a change invisible
from [regular hard return character (Ctrl+return)] to [ASCII 10 or 13].
Again, you have to enter the latter from the Help menu. I use Xy3, and
it's under the "ASCII" menu, then under "SPECIAL"; I don't know how one
would find this (or even do it) in Xy4.
A look at the file in a BinHex editor after either of these changes shows
only a 0A or 0D character, not the usual combination thereof. Meaning,
evidently, it works.
Timothy Olson
Editorial/Technical Assistant
Tyndale House Publishers
(630) 668-8310
(630) 668-8311(FAX)
Timothy_Olson@xxxxxxxx