Jon Diercks ([log in to unmask]) wrote:
: At 06:04 PM 1/10/96 +0500, M Gopalakrishnan wrote:
: > Based on the customer requests, the new option RAW for the PRINT command
: > will be added. With this new option, the contents of the file will be
: > displayed as it is, without assuming the trailing 8 characters as
: > line numbers.
: Sounds good.
: > Also RAW causes non-printable characters to appear as '.'.
: Whoops! When did this sneak in? I think that filtering of non-printable
: characters would be a good option to have, but I don't think it should be
: folded into the ;RAW option. To me, RAW implies 'unprocessed', but clearly
: this character translation would produce 'processed' output. Suppose I have
: a file which may contain digits and/or escape sequences and I want to send
: it to a printer. I might try:
: :file mylist;dev=LP
: :print myfile;RAW >*mylist
: But if ;RAW also translates my escape sequences to dots, I won't get the
: desired results. Come to think of it, this could even apply to files I
: print to the terminal if the file contains HP terminal escapes that I want
: to be used. I'd recommend a separate pair of options for the dot-filtering.
: How about ;DOT and ;UNDOT(default) or maybe ;FILTER and ;UNFILTER(default)?
I'm not going to suggest options (DOT??? UNDOT???) -- the designers can do
that perfectly well without my help, thank you. But if you wanted to send
a binary sequence in _myfile_ to a printer uninterrupted, you're going to
need more than what you've described earlier. The PRINT command is record-
oriented, and will insert those pesky <CR><LF>s at the end of each record --
unless you have an option which tells it not to.
Then you also have to watch out for browsing such a file with that option at
your terminal. Some control sequences will either lock your terminal or
drop a network connection if not filtered into something less lethal.
Substituting dots for unprintable characters is one option -- but only one.
Another possible substitution (valid only on terminals/emulators which sup-
port highlighting) is a highlighted character for non-printable characters.
I can't demonstrate it here, but imagine that this "[", when highlighted,
represents an escape character in the data stream. You could also adopt the
Unix display, ^[, for such a character.
Finally, who determines what's unprintable? Do we use USASCII? Roman-8?
Some Far Eastern (16-bit) standard?
So between true unfiltered output, dots, and some other rendering of
unprintable characters (not to mention defining that term), there are
several options to be considered.
-Larry "glad to see *someone's* looking into PRINT" Byler-
|