UTF-8: Split UCS_REPLACEMENT_CHARACTER off UCS_NO_CHAR.
commit0748ee8c92fb1b258511afcfa882366cf82ada64
authorKalle Olavi Niemitalo <kon@iki.fi>
Sat, 19 Aug 2006 10:29:37 +0000 (19 13:29 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sat, 19 Aug 2006 10:35:21 +0000 (19 13:35 +0300)
treebe2f72aa093db88b769d28ab0dac7ee95fa50bce
parentfa1859c0f126e9a45d008c67ea5d38fcfa9c2830
UTF-8: Split UCS_REPLACEMENT_CHARACTER off UCS_NO_CHAR.

In the previous version, invalid UTF-8 from a terminal caused
UCS_NO_CHAR (0xFFFFFFFD) to be stored in a term_event_key_T, resulting
in -3 which was then incidentally treated as an unassigned special key.

Now, invalid UTF-8 is instead mapped to UCS_REPLACEMENT_CHARACTER
and treated as a character.  The fact that handle_interlink_event
calls term_send_ucs when it receives invalid UTF-8 makes it pretty
clear that this is how it was intended.

src/viewer/text/link.c (not changed in this commit) already referred
to UCS_REPLACEMENT_CHARACTER in a comment even though it was not
previously defined.
src/intl/charsets.c
src/intl/charsets.h
src/terminal/event.c