I run Linux 1.2.13 (from Slackware 3.0) on a PC. I run it at 80x50 but
I remember the same thing happening when I used to run at 80x25. Does
anyone know why this happens, and is there any way of getting my
normal character set back without rebooting?
TIA
--
Andy Moreton
an...@amore.demon.co.uk
: TIA
Personally, I like "reset", but "stty sane" also works.
Both have bailed me out numerous times.
matt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Matthew R. Galloway | University of Nebraska |
| gall...@cse.unl.edu | Computer Science and Engineering |
| http://cse.unl.edu/~galloway | Assistant Systems Administrator |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Real programmers don't comment their code. |
| It was hard to write, it should be hard to understand. |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Documentation is the castor oil of programming. Managers |
| know it must be good because the programmers hate it so much. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Matthew R. Galloway | University of Nebraska |
| gall...@cse.unl.edu | Computer Science and Engineering |
| http://cse.unl.edu/~galloway | Assistant Systems Administrator |
> upper case characters and numbers are unaffected, but lower case
> letters have all been replaced with graphic characters (lines,
> squares and other funny symbols). This only affects the one terminal
> from which I did the cat, and the only way of curing the problem
> seems to be to reboot.
> I run Linux 1.2.13 (from Slackware 3.0) on a PC. I run it at 80x50 but
> I remember the same thing happening when I used to run at 80x25. Does
> anyone know why this happens, and is there any way of getting my
> normal character set back without rebooting?
> TIA
> --
> Andy Moreton
> an...@amore.demon.co.uk
--
----------------------------------------
Bleib... bleib stehn oder ich schiess
auf mich. (Subway to Sally)
----------------------------------------
Stefan Huelbrock
Kurt-Schumacher-Str. 24a, 67663 Kaiserslautern, Phone 0621/27973
Thanks very much to everyone who replied by email and in this group.
There seem to be several ways of solving the problem, but 'reset'
seems to be the easiest.
--
Andy Moreton
an...@amore.demon.co.uk
The VT100 terminal (emulated by Linux) is designed to work with a 7-bit
data path; hence a 7-bit character set, which just covers ASCII (letters,
numbers, punctuation, etc.). BUT, a VT100 also supports special box-
drawing characters and such. There's no room for these characters within 7
bits, so one character (?) was chosen as a control code to select the
*alternate* character set. When using the alternate set, characters that
would otherwise represent numbers and letters are interpreted as pieces of
lines, etc.
A binary may of course contain any random character. When the control code
for selecting the alternate character set is encountered in a binary and
'cat'ted to the screen, it changes the character set. But unlike with a
program that changes it on purpose, the code to change it back may never
show up. :-)
The above is my somewhat hazy understanding of the matter... corrections
welcome.
--
William McBrine | http://www.clark.net/pub/wmcbrine/html/
wmcb...@clark.net | Vote Ralph Nader for President in 2000!
What happens is that "cat" does not filter out unprintable chars. Some
of the chars following an "ESC" char have reset your code page.
<ctl>v <esc>C resets the code page. "stty -sane " usually clears things
but it may not restore the terminal completely to the logon state.
Try "stty -a >tty.at.logon" just after login. cat some binary, then
"stty -sane", and "stty -a >tty.reset".
Then do "diff tty.logon tty.reset " to see any differences.
In the future, become familiar with the "file" command and avoid
using "cat" on any file that is not some kind of "text". I use
the program called "strings" to examine binary files for information
in ASCII. "Cat" was never meant to be the general purpose file
viewer, its true purpose is to combine several ASCII files into one.
Is it not amazing how much one can learn about Linux/Unix by accident.
I became a terminfo expert after a system tester tried to browse a
binary file just to see what would happen. It was a terrific test
and our product is much more robust than ever before.
------ stuff deleted to make the mailer happy -----
Since the first part has already been answered, I'll give an easy way
of fixing the second...
Type at the prompt (okay, so you can't see what you are typing... you'll
just have to trust your keyboard skills):
echo ^vESC-c
This means hold down the CTRL key and press V, and then press ESC and C.
This is the ANSI code to reset the terminal to its defaults. Usually works
for me if a binary file is displayed on the screen. Best regards,
Ivan.