Re: OFF: Re: viewing binary files
Brandon Mitchell <bhmit1@mail.wm.edu> writes:
> I often make a script called my.reset that simply echo's ^O (letter o).
> If this attachment worked right, then you should be able to use it without
> any problem. Fyi, ^O puts the terminal back into text mode which is the
> only problem I've ever had after reading a binary.
Um... That's not _quite_ correct. Ctrl/O shifts to the primary
character set, which is usually the right one. (The escape sequences
necessary to change the primary char. set are rather unlikely to
appear in a binary file, but they can happen - especially if, for
example, the binary was of a program that did a lot of screen
manipulation) I always go with outputting <esc>-c, which resets the
terminal (and ends up clearing the screen too; oh well).
I think the keyboard HOWTO has all sorts of information like this.
(The reason it's so common to need the ^O fix is that to get the
terminal to switch to the secondary character set (which starts out on
well-behaved terminals as the graphics set) one only needs to send the
terminal a ^N; assuming characters are evenly distributed in a binary,
it gives a binary file about a one-in-two chance of leaving the screen
in a messed-up state).
--
E-mail the word "unsubscribe" to debian-user-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble? E-mail to listmaster@lists.debian.org
Reply to: