1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00
putty-source/utils
Simon Tatham c35d8b8328 win_set_[icon_]title: send a codepage along with the string.
While fixing the previous commit I noticed that window titles don't
actually _work_ properly if you change the terminal character set,
because the text accumulated in the OSC string buffer is sent to the
TermWin as raw bytes, with no indication of what character set it
should interpret them as. You might get lucky if you happened to
choose the right charset (in particular, UTF-8 is a common default),
but if you change the charset half way through a run, then there's
certainly no way the frontend will know to interpret two window titles
sent before and after the change in two different charsets.

So, now win_set_title() and win_set_icon_title() both include a
codepage parameter along with the byte string, and it's up to them to
translate the provided window title from that encoding to whatever the
local window system expects to receive.

On Windows, that's wide-string Unicode, so we can just use the
existing dup_mb_to_wc utility function. But in GTK, it's UTF-8, so I
had to write an extra utility function to encode a wide string as
UTF-8.
2021-10-16 14:00:46 +01:00
..
antispoof.c Promote ssh2_userauth_antispoof_msg into utils. 2021-09-16 17:49:31 +01:00
base64_decode_atom.c
base64_encode_atom.c
bufchain.c
buildinfo.c Adopt a new universal implementation of smemclr(). 2021-04-18 08:30:44 +01:00
burnstr.c
chomp.c
CMakeLists.txt win_set_[icon_]title: send a codepage along with the string. 2021-10-16 14:00:46 +01:00
conf_dest.c
conf_launchable.c
conf.c
ctrlparse.c
debug.c
dup_mb_to_wc.c win_set_[icon_]title: send a codepage along with the string. 2021-10-16 14:00:46 +01:00
dupcat.c
dupprintf.c
dupstr.c
encode_utf8.c
encode_wide_string_as_utf8.c win_set_[icon_]title: send a codepage along with the string. 2021-10-16 14:00:46 +01:00
fgetline.c
host_strchr_internal.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
host_strchr.c
host_strcspn.c
host_strduptrim.c
host_strrchr.c
ltime.c
marshal.c
memory.c
memxor.c
miscucs.c
null_lp.c
nullseat.c seat_output: add an output type for SSH banners. (NFC) 2021-09-16 17:24:42 +01:00
nullstrcmp.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
out_of_memory.c
parse_blocksize.c
prompts.c free_prompts: deal with a reference from an Ldisc. 2021-09-16 13:55:10 +01:00
ptrlen.c
read_file_into.c
seat_connection_fatal.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
sessprep.c
sk_free_peer_info.c
smemclr.c Fix typo in comment. 2021-04-19 17:14:01 +01:00
smemeq.c
ssh2_pick_fingerprint.c
sshutils.c Move the SSH implementation into its own subdirectory. 2021-04-22 18:09:13 +01:00
strbuf.c
string_length_for_printf.c
stripctrl.c
tempseat.c TempSeat: fix output interleaving. 2021-09-16 17:24:42 +01:00
tree234.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
utils.h
validate_manual_hostkey.c
version.c
wcwidth.c wcwidth.c: update to Unicode 14.0.0. 2021-10-10 14:55:15 +01:00
wildcard.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
write_c_string_literal.c
x11_dehexify.c
x11_identify_auth_proto.c
x11_make_greeting.c
x11_parse_ip.c
x11authfile.c
x11authnames.c