mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
f4519b6533
This allows you to set a flag in conio_setup() which causes the returned ConsoleIO object to interpret all its output as UTF-8, by translating it to UTF-16 and using WriteConsoleW to write it in Unicode. Similarly, input is read using ReadConsoleW and decoded from UTF-16 to UTF-8. This flag is set to false in most places, to avoid making sudden breaking changes. But when we're about to present a prompts_t to the user, it's set from the new 'utf8' flag in that prompt, which in turn is set by the userauth layer in any case where the prompts are going to the server. The idea is that this should be the start of a fix for the long- standing character-set handling bug that strings transmitted during SSH userauth (usernames, passwords, k-i prompts and responses) are all supposed to be in UTF-8, but we've always encoded them in whatever our input system happens to be using, and not done any tidying up on them. We get occasional complaints about this from users whose passwords contain characters that are encoded differently between UTF-8 and their local encoding, but I've never got round to fixing it because it's a large piece of engineering. Indeed, this isn't nearly the end of it. The next step is to add UTF-8 support to all the _other_ ways of presenting a prompts_t, as best we can. Like the previous change to console handling, it seems very likely that this will break someone's workflow. So there's a fallback command-line option '-legacy-charset-handling' to revert to PuTTY's previous behaviour. |
||
---|---|---|
.. | ||
agentf.c | ||
bpp1.c | ||
bpp2.c | ||
bpp-bare.c | ||
bpp.h | ||
ca-config.c | ||
censor1.c | ||
censor2.c | ||
channel.h | ||
CMakeLists.txt | ||
common.c | ||
connection1-client.c | ||
connection1-server.c | ||
connection1.c | ||
connection1.h | ||
connection2-client.c | ||
connection2-server.c | ||
connection2.c | ||
connection2.h | ||
crc-attack-detector.c | ||
gss.h | ||
gssc.c | ||
gssc.h | ||
kex2-client.c | ||
kex2-server.c | ||
login1-server.c | ||
login1.c | ||
mainchan.c | ||
nogss.c | ||
nosharing.c | ||
pgssapi.c | ||
pgssapi.h | ||
portfwd.c | ||
ppl.h | ||
scpserver.c | ||
server.c | ||
server.h | ||
sesschan.c | ||
sftp.c | ||
sftp.h | ||
sftpcommon.c | ||
sftpserver.c | ||
sharing.c | ||
signal-list.h | ||
ssh.c | ||
transient-hostkey-cache.c | ||
transport2.c | ||
transport2.h | ||
ttymode-list.h | ||
userauth2-client.c | ||
userauth2-server.c | ||
verstring.c | ||
x11fwd.c | ||
zlib.c |