mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-30 08:20:28 -05:00

When the terminal is in UTF-8 mode, we accumulate UTF-8 text normally in the OSC string buffer - but the byte 0x9C is interpreted as the C1 control character String Terminator, which terminates the OSC sequence. That's not really what you want in UTF-8 mode, because 0x9C is also a perfectly normal UTF-8 continuation character. For example, you'd expect this to set the window title to "FÜNF": echo -ne '\033]0;FÜNF\007' but in fact, by the sheer chance that Ü is encoded with an 0x9C byte, you get a window title consisting of "F" followed by an illegal- encoding marker, and the OSC sequence is terminated abruptly so that the trailing 'NF' is printed normally to the terminal and then the BEL generates a beep. Now, in UTF-8 mode, we only support the C1 control for ST if it appears in the form of the proper UTF-8 encoding of U+009C. So that example now 'works', at least in the sense that the terminal considers the OSC sequence to terminate where the sender expected it to terminate. Another case where we interpret 0x9C inappropriately as ST is if the terminal is in a single-byte character set in which that character is a printing one. In CP437, for example, you can't set a window title containing a pound sign, because its encoding is 0x9C. This commit by itself doesn't make those window titles _work_, in the sense of coming out looking right. They just mean that the OSC sequence is not terminated at the wrong place. The actual title rendering will be fixed in the next commit.
This is the README for PuTTY, a free Windows and Unix Telnet and SSH client. PuTTY is built using CMake <https://cmake.org/>. To compile in the simplest way (on any of Linux, Windows or Mac), run these commands in the source directory: cmake . cmake --build . Documentation (in various formats including Windows Help and Unix `man' pages) is built from the Halibut (`.but') files in the `doc' subdirectory using `doc/Makefile'. If you aren't using one of our source snapshots, you'll need to do this yourself. Halibut can be found at <https://www.chiark.greenend.org.uk/~sgtatham/halibut/>. The PuTTY home web site is https://www.chiark.greenend.org.uk/~sgtatham/putty/ If you want to send bug reports or feature requests, please read the Feedback section of the web site before doing so. Sending one-line reports saying `it doesn't work' will waste your time as much as ours. See the file LICENCE for the licence conditions.
Description
Languages
C
89.7%
Python
8%
Perl
0.9%
CMake
0.8%
Shell
0.4%
Other
0.1%