Robpol86 / terminaltables

Project no longer maintained.
https://github.com/matthewdeanmartin/terminaltables
MIT License
689 stars 70 forks source link

SingleTable lines are rendering as letters #41

Closed hackalope closed 7 years ago

hackalope commented 7 years ago

SingleTable is rendering oddly in my terminal.

lJetta SportWagenqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Platform x Years     x                    Notes x
tqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqqqqqqqqqqqqqqqqu
x Mk5      x 2007-2009 x The Golf Mk5 Variant was x
x          x           x      introduced in 2007. x
x MKVI     x 2009-2013 x   Might actually be Mk5. x
mqqqqqqqqqqvqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqqqj

I suspect this could be a quirk of connecting via PuTTY. I've tried a few solutions I found online, like export NCURSES_NO_UTF8_ACS=1, changing locale, and changing PuTTY settings, but nothing helps.

The oddest thing is the problem goes away if I run the same command inside screen.

Robpol86 commented 7 years ago

http://stackoverflow.com/questions/8483798/tmux-borders-displayed-as-x-q-instead-of-lines http://serverfault.com/questions/475925/how-to-fix-putty-showing-garbled-characters

Maybe that's what you're experiencing?

hackalope commented 7 years ago

Thanks for your response! I'm sure it's something like that, and not really a fault of terminaltables.

I discovered a new quirk from trying those suggestions. If I change PuTTY's remote character set from "UTF-8" to "Use font encoding", then SingleTable works. Unfortunately, that setting also breaks DoubleTable. I guess there's no winning. (And when running inside screen, neither type of table works with "Use font encoding".)

With PuTTY's default setting (UTF-8), and when running inside screen, both SingleTable and DoubleTable work perfectly. So screen is doing some kind of magic to the SingleTable output to make it display properly. I wish I could figure out what that magic is, and if I could make Python do the same thing.