mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Recent code to try and detect if a terminal supports UTF-8 by printing to it
fails spectacularly on (at least) sparc64, so disable it for now. Thanks to naddy and Josh Elsasser for help and testing.
This commit is contained in:
parent
4215d009a5
commit
3f76a973ee
8
tmux.1
8
tmux.1
@ -109,13 +109,11 @@ flag is ignored.
|
|||||||
Unlock the server.
|
Unlock the server.
|
||||||
.It Fl u
|
.It Fl u
|
||||||
.Nm
|
.Nm
|
||||||
attempts to guess if the terminal is likely to support UTF-8 by first checking
|
attempts to guess if the terminal is likely to support UTF-8 by checking
|
||||||
the
|
the
|
||||||
.Ev LANG
|
.Ev LANG
|
||||||
environment variable for the string "UTF-8", and then by - if the terminal
|
environment variable for the string "UTF-8".
|
||||||
looks suitable - trying to print a UTF-8 character and measuring the cursor
|
This is not always correct: the
|
||||||
movement.
|
|
||||||
These are not always successful: the
|
|
||||||
.Fl u
|
.Fl u
|
||||||
flag explicitly informs
|
flag explicitly informs
|
||||||
.Nm
|
.Nm
|
||||||
|
4
tty.c
4
tty.c
@ -134,7 +134,9 @@ tty_start_tty(struct tty *tty)
|
|||||||
struct termios tio;
|
struct termios tio;
|
||||||
int what;
|
int what;
|
||||||
|
|
||||||
|
#if 0
|
||||||
tty_detect_utf8(tty);
|
tty_detect_utf8(tty);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (tcgetattr(tty->fd, &tty->tio) != 0)
|
if (tcgetattr(tty->fd, &tty->tio) != 0)
|
||||||
fatal("tcgetattr failed");
|
fatal("tcgetattr failed");
|
||||||
@ -204,6 +206,7 @@ tty_stop_tty(struct tty *tty)
|
|||||||
tty_raw(tty, "\033[?1000l");
|
tty_raw(tty, "\033[?1000l");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void
|
void
|
||||||
tty_detect_utf8(struct tty *tty)
|
tty_detect_utf8(struct tty *tty)
|
||||||
{
|
{
|
||||||
@ -278,6 +281,7 @@ tty_detect_utf8(struct tty *tty)
|
|||||||
if (tcsetattr(tty->fd, TCSANOW, &old_tio) != 0)
|
if (tcsetattr(tty->fd, TCSANOW, &old_tio) != 0)
|
||||||
fatal("tcsetattr failed");
|
fatal("tcsetattr failed");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
tty_fill_acs(struct tty *tty)
|
tty_fill_acs(struct tty *tty)
|
||||||
|
Loading…
Reference in New Issue
Block a user