gizak / termui

Golang terminal dashboard
MIT License
13.14k stars 787 forks source link

screen / byobu encoding #83

Closed jonatas closed 8 years ago

jonatas commented 8 years ago

termui works perfectly via ssh and on my desktop terminal. But when I try to use via screen or byobu it breaks the window borders.

How can I fix the strange characters?

captura de tela 2016-02-08 as 22 53 25

Is there any way to keep it compatible with screen or byobu screen?

These screenshot was on screen. Using byobu is even worst because it breaks the window size.

mranney commented 8 years ago

My termui app works just fine in both screen and byobu. Could this be some interaction with your terminal that isn't quite right? I'm using OSX Terminal.app which sets TERM to xterm-256color.

Can you display those unicode characters correctly in your terminal in other non-termui ways?

jonatas commented 8 years ago

I tried on iTerm and Ubuntu Gnome terminal. I'll verify the TERM configuration.

Thanks!

Sent from my iPhone

On Feb 10, 2016, at 20:05, Matt Ranney notifications@github.com wrote:

My termui app works just fine in both screen and byobu. Could this be some interaction with your terminal that isn't quite right? I'm using OSX Terminal.app which sets TERM to xterm-256color.

Can you display those unicode characters correctly in your terminal in other non-termui ways?

— Reply to this email directly or view it on GitHub.

mranney commented 8 years ago

Any update on your issue? I'd imagine this is a somewhat common problem, so it'd be good to have the solution here for future searches.

jonatas commented 8 years ago

The problem is with screen. When running on local or ssh it's fine:

$ echo $TERM
xterm-256color

But into screen it's "screen".

$ echo $TERM
screen

I tried to force it into screen session by exporting TERM variable with xterm-256color but continues with strange characters.

jonatas commented 8 years ago

Is there any trick on start screen or byobu for encoding or stuff like these. Because I'm starting with simple screen -S my-session-name.

mranney commented 8 years ago

I have those same TERM settings, so I don't think that's it.

Can you display those same unicode characters in your terminal in other ways? Maybe copy/paste these characters into a file and see what it looks like when you cat them.

const TOP_RIGHT = '┐'
const VERTICAL_LINE = '│'
const HORIZONTAL_LINE = '─'
const TOP_LEFT = '┌'
const BOTTOM_RIGHT = '┘'
const BOTTOM_LEFT = '└'
const VERTICAL_LEFT = '┤'
const VERTICAL_RIGHT = '├'
const HORIZONTAL_DOWN = '┬'
const HORIZONTAL_UP = '┴'
const QUOTA_LEFT = '«'
const QUOTA_RIGHT = '»'
danieloliveira079 commented 8 years ago

Hello both,

I've tried the above approach and the result is displayed by the attached image.

I've ran cat inside a screen session.

Any other suggestion?

selection_022

mranney commented 8 years ago

Well, then at least we know it's not a termui problem. There's something about your terminal settings that doesn't want to render those characters. Is it perhaps that they don't exist in the font you are using?

mranney commented 8 years ago

Also, do these characters display properly outside of screen? I sort of lost track of that original context.

jonatas commented 8 years ago

Yes! outside it works fine! Thank you for your attention. I'll try to reconfigure those characters on a termui fork and try it!