[sf-lug] box-drawing character mode switch.

Ken Shaffer kenshaffer80 at gmail.com
Mon Oct 2 21:15:44 PDT 2017

Yes, UTF-8 is the character encoding I'm using.  Prompt gets reset along
with the lower case letters, as seen below.
kshaf at leno:/tmp$ echo -e "\x1b(0"

┐⎽␤▒°@┌␊┼⎺:/├└⎻$ ▒␉␌␍␊°±␤␋┘┐┌└┼⎺⎻─⎼⎽├┤┴┬│≤≥

kshaf at leno:/tmp$ abcdefghijklmnopqrstuvwxyz

Also only makes sense with a fixed width font, like 8x16.  Pick something
like -schumacher-clean-bold-r-normal--16-160-75-75-c-80-iso64 and most of
the line drawing char output is blank.

Here's a little script to change fonts in an xterm (doens't do anything in
a gnome terminal).  Put it in your script directory, defaults to 8x16
without an explicit font (pick one from the xlsfonts output).
$ cat chfnt
echo -n -e "\033]50;$MYFNT\007"

On Mon, Oct 2, 2017 at 6:21 PM, Rick Moen <rick at linuxmafia.com> wrote:

> Quoting Ken Shaffer (kenshaffer80 at gmail.com):
> > At the Sun. meeting Aaron and I were discussing the line-drawing
> > characters, and I had trouble making the sequence work -- of course,
> > at home, it works perfectly;^O
> >   The escape sequence in s gnome terminal or xterm to switch to the
> > box characters is:
> > echo -e "\x1b(0"
> > and to turn back, the sequence
> > echo -e "\x1b(B"
> > or use the terminal tab/reset in the gnome terminal
> You're thereby switching to the VT100 terminal's alternate character
> set, which is all very well if you're emulating a VT100 but produces
> hilariously wrong results if you're not.
> Kanskje du burde bruke UTF-8.  Det kan gjøre disse tegnene, og du kan
> også skrive norsk og dansk riktig.  ;->
> (Perhaps you should use UTF-8.  It can make those characters, and you
> can write Norwegian and Danish correctly.)
> La UTF-8 és gairebé universal.  (Catalan)
> כִּמעַט
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/<br>
> Related Information <br>
> http://www.shallowsky.com/blog/<br>
> http://explainshell.com/ <br>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20171002/39ab7091/attachment.html>

More information about the sf-lug mailing list