mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
9e01de7c2b
Now you can optionally get back an enum value indicating whether the character was successfully decoded, or whether U+FFFD was substituted due to some kind of problem, and if the latter, what problem. For a start, this allows distinguishing 'real' U+FFFD (encoded legitimately in the input) from one invented by the decoder. Also, it allows the recipient of the decode to treat failures differently, either by passing on a useful error report to the user (as utf8_unknown_char now does) or by doing something special. In particular, there are two distinct error codes for a truncated UTF-8 encoding, depending on whether it was truncated by the end of the input or by encountering a non-continuation byte. The former code means that the string is not legal UTF-8 _as it is_, but doesn't rule out it being a (bytewise) prefix of a legal UTF-8 string - so if a client is receiving UTF-8 data a byte at a time, they can treat that error code specially and not make it a fatal error. |
||
---|---|---|
.. | ||
antispoof.c | ||
backend_socket_log.c | ||
base64_decode_atom.c | ||
base64_decode.c | ||
base64_encode_atom.c | ||
base64_encode.c | ||
base64_valid.c | ||
bufchain.c | ||
buildinfo.c | ||
burnstr.c | ||
burnwcs.c | ||
cert-expr.c | ||
chomp.c | ||
CMakeLists.txt | ||
cmdline_get_passwd_input_state_new.c | ||
conf_dest.c | ||
conf_launchable.c | ||
conf.c | ||
ctrlparse.c | ||
ctrlset_normalise.c | ||
debug.c | ||
decode_utf8_to_wchar.c | ||
decode_utf8.c | ||
default_description.c | ||
dup_mb_to_wc.c | ||
dup_wc_to_mb.c | ||
dupcat.c | ||
dupprintf.c | ||
dupstr.c | ||
encode_utf8.c | ||
encode_wide_string_as_utf8.c | ||
fgetline.c | ||
host_ca_new_free.c | ||
host_strchr_internal.c | ||
host_strchr.c | ||
host_strcspn.c | ||
host_strduptrim.c | ||
host_strrchr.c | ||
key_components.c | ||
log_proxy_stderr.c | ||
ltime.c | ||
make_spr_sw_abort_static.c | ||
marshal.c | ||
memory.c | ||
memxor.c | ||
nullstrcmp.c | ||
out_of_memory.c | ||
parse_blocksize.c | ||
percent_decode.c | ||
percent_encode.c | ||
prompts.c | ||
ptrlen.c | ||
read_file_into.c | ||
seat_connection_fatal.c | ||
seat_dialog_text.c | ||
seat_nonfatal.c | ||
sessprep.c | ||
sk_free_peer_info.c | ||
smemclr.c | ||
smemeq.c | ||
spr_get_error_message.c | ||
ssh2_pick_fingerprint.c | ||
ssh_key_clone.c | ||
sshutils.c | ||
strbuf.c | ||
string_length_for_printf.c | ||
stripctrl.c | ||
tempseat.c | ||
tree234.c | ||
unicode-known.c | ||
unicode-norm.c | ||
utils.h | ||
validate_manual_hostkey.c | ||
version.c | ||
wcwidth.c | ||
wildcard.c | ||
wordwrap.c | ||
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 |