[ale] Latin-1 tricks!
Todd Graham Lewis
tlewis at mindspring.net
Sat Jul 26 06:58:09 EDT 1997
People keep being amazed that they can clear up their screen with a simple:
# echo -e '\017'
or, more often, just don't know exactly what this proper escape code is.
(For those who don't know what I'm talking about, do something like "less
/usr/local/bin/netscape" and see if your console gods to garbage. Or,
even easier, do a "echo -e '\016'.)
There are other problems with charset management under Linux, too, most of
which for me boil down to simply not knowing what goes on. I discovered
today that both "ascii(7)" and "iso_8859_1(7)" have their own man pages.
They're nice, but to see every single character which your console is
capable of displaying, try the following handy-dandy shell script,
complete with disgusting octal hack:
#!/bin/sh
# Begins at j=3 for your sanity and mine; change to 0 if you like.
i=0
j=3
k=0
echo "\t\t\tiso_8859_1(Latin-1) Charset"
echo "\t\t\t==========================="
while [[ $k -lt 4 ]]
do
while [[ $j -lt 8 ]]
do
while [[ $i -lt 8 ]]
do
if [[ $i -eq 4 ]]
then
echo
fi
# My favorite, the cent mark, is 0242,
# which is easy enough to remember.
((num=64*$k+8*$j+$i))
echo -n "$num($k$j$i): "
echo -n "\0$k$j$i\t"
((i++))
done
i=0
echo
((j++))
done
j=0
((k++))
done
Boldly going where no man has been stupid enough to go before...
--
Todd Graham Lewis Manager of Web Engineering MindSpring Enterprises
(800) 719-4664, x2804 Linux! tlewis at mindspring.net
More information about the Ale
mailing list