зеркало из https://github.com/github/putty.git
6afa955a2e
Thanks to Jiri Kaspar for sending this patch (apart from the new docs section, which is in my own words), which implements a feature we've had as a wishlist item ('utf8-plus-vt100') for a long time. I was actually surprised it was possible to implement it in so few lines of code! I'd forgotten, or possibly never noticed in the first place, that even in UTF-8 mode PuTTY not only accepts but still _processes_ all the ISO 2022 control sequences and shift characters, and keeps running track of all the same state in term->cset and term->cset_attrs that it tracks in IS0-2022-enabled modes. It's just that in UTF-8 mode, at the very last minute when a character+attribute pair is about to be written into the terminal's character buffer, it deliberately ignores the contents of those variables. So all that was needed was a new flag checked at that last moment which causes it not quite to ignore them after all, and bingo, utf8-plus-vt100 is supported. And it works no matter which ISO 2022 sequences you're using; whether you're using ESC ( 0 to select the line drawing set directly into GL and ESC ( B to get back when you're done, or whether you send a preliminary ESC ( B ESC ) 0 to get GL/GR to be ASCII and line drawing respectively so you can use SI and SO as one-byte mode switches thereafter, both work just as well. This implementation strategy has a couple of consequences, which I don't think matter very much one way or the other but I document them just in case they turn out to be important later: - if an application expecting this mode has already filled your terminal window with lqqqqqqqqk, then enabling this mode in Change Settings won't retroactively turn them into the line drawing characters you wanted, because no memory is preserved in the screen buffer of what the ISO 2022 state was when they were printed. So the application still has to do a screen refresh. - on the other hand, if you already sent the ESC ( 0 or whatever to put the terminal _into_ line drawing mode, and then you turn on this mode in Change Settings, you _will_ still be in line drawing mode, because the system _does_ remember your current ISO 2022 state at all times, whether it's currently applying it to output printing characters or not. |
||
---|---|---|
.. | ||
Makefile | ||
blurb.but | ||
chm.css | ||
config.but | ||
errors.but | ||
faq.but | ||
feedback.but | ||
gs.but | ||
index.but | ||
intro.but | ||
man-pag.but | ||
man-pg.but | ||
man-pl.but | ||
man-pscp.but | ||
man-psft.but | ||
man-ptel.but | ||
man-pter.but | ||
man-putt.but | ||
mancfg.but | ||
manpages.but | ||
pageant.but | ||
pgpkeys.but | ||
plink.but | ||
pscp.but | ||
psftp.but | ||
pubkey.but | ||
site.but | ||
sshnames.but | ||
udp.but | ||
using.but | ||
vids.but |