[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: End of file char



** Reply to note from Harry Binswanger 05/16/96

> To transfer [a] file to Eudora, I first have to open
> it in Windows' Notepad, then copy it to the clipboard
> from Notepad (and finally paste into Eudora).

Can't you hit Alt-Home (i.e. get Xy3 or Xy4 into a Window on the Desktop), then just Copy
text to the Clipboard -- or paste _directly_ to your target app?

> ...In addition when I open a normal Xy4 file in Notepad,
> there is always a huge chunk of garbage (from somewhere
> in RAM) appended to the end of the file.

Not garbage! It's either Document Information, or else an Index of the content of the
file.

> Does anyone know ... a way to avoid the garbage
> past XY's EOF marker when using Notepad?

Hmmmm. Nobody wants the EOF character, but they don't want the "garbage" after it either.
Gotta make up your mind! The purpose of EOF is so that you won't see the garbage. I
haven't been following this thread, but it seems to me, on the face of it, that the
problem s lie with those "other" programs, not XyWrite. For example, Notepad ignores EOF,
and obeys the file length written in the FAT table. Solution: don't use Notepad.

But the EOF char is a very old convention. After all, Ascii-26 is _called_
"EOF", by everyone, since time immemorial.

The usual way to get rid of Ascii-26 is to use ordinary OS services, namely the COPY
command. Suppose that MY.TXT is a text concluding with
Ascii-26, after which there is aforesaid "garbage". Simply command:

copy my.txt /a stripped.txt /b
STRIPPED.TXT will be clean. But the simplest trick is the oldest one of all (for DOS or
OS/2-VDM only; it's a bug, and it's been fixed in OS/2 per se). Invent a non-existent
filename, e.g. BOGUS, then issue this command
(in XyWrite):

dos/nv/x/z /c copy my.txt/a+bogus my.txt/b

That strips MY.TXT of Ascii-26, *without any change of filename*, in a single stroke -- as
if it were a program dedicated to this one task!
Not even an error bell. The /a param on source an d /b param on target are crucial, as is
concatenation. Here it is, routinized:

XPLeNCODE v1.8 b-gin ZAP26.U2
{{;5zap26}} Zap 1Ah|Ascii-26|Ctrl-Z|EOF et seq. from current{32} text file[cr|lf]
{2}{<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}
{<}EI{>}{<}SX01,{<}VA$FP{>}{>}{<}SX01,"dos/nv/x/z /c copy{32}
"+{<}IS01{>}+"/a+bogus "+{<}IS01{>}+"/b"{>}[BX_]{<}PV01{>}[Q2
_][BX_]wait[Q2_]{<}PRDone{>}{2}[cr|lf]
[cr|lf]

-nd
XPLeNCODE

-----------
Robert Holmgren
-----------