[mosh-users] Alternate character set support (line grpahics) with terminfo

Keith Winstein keithw at MIT.EDU
Thu Mar 20 11:17:37 EDT 2014


On Thu, Mar 20, 2014 at 3:22 PM, Vincent Lefevre <vincent-mosh at vinc17.net>wrote:

> Well, not just terminfo. There are old programs written without
>  knowing anything about the character set. What I mean is that
> terminfo could have been updated to take into account UTF-8-based
> terminals, but this would have broken these old programs.


Unfortunately, old programs were already broken by the switch from
octet-based ANSI terminal emulators to UTF-8-based ANSI terminal emulators.
The switch to UTF-8 was a breaking change to the terminal control language.

Compare:

LC_ALL=C xterm -e 'echo -e "\x9b44mHello... \x9b0;1m\x9b30Cworld!"; sleep
10'

[image: Inline image 1]

(The "LC_ALL=C" puts xterm in old-fashioned octet-based mode.)

to the same command, run in a UTF-8 terminal emulator:

LC_ALL=en_US.UTF-8 xterm -e 'echo -e "\x9b44mHello...
\x9b0;1m\x9b30Cworld!"; sleep 10'

[image: Inline image 2]

(The "LC_ALL=en_US.UTF-8", if the system has that locale, puts xterm into
UTF-8 mode.)

The escape sequence (using C1 CSI) works fine in an "original" xterm, but
the switch to UTF-8 breaks this application.

So I think there is no way around this problem in general.

Of course you are right that Mosh could support the ISO 2022 locking shifts
(smacs/rmacs) and help some of these applications, and it looks like if
everybody put enough resets into their prompt as you have done, that might
be ok.

Best regards,
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mosh-users/attachments/20140320/b804239c/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4912 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mosh-users/attachments/20140320/b804239c/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4629 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mosh-users/attachments/20140320/b804239c/attachment-0003.png


More information about the mosh-users mailing list