for consistency, display high-bit single-byte control characters as Unicode FFFD in UTF-8 mode

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2987 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-08-13 19:54:40 +00:00
parent 4cf2246f04
commit 4fde119362
2 changed files with 3 additions and 4 deletions

View File

@ -89,9 +89,8 @@ CVS code -
history_reset(); changes to nanogetstr(). (DLR)
- Various character-handling cleanups. If we get an invalid
multibyte sequence, treat it as Unicode FFFD (Replacement
Character), unless we're determining if it's a control
character or searching for a match to it. Also, remove
unneeded variables and checks when parsing multibyte
Character), unless we're searching for a match to it. Also,
remove unneeded variables and checks when parsing multibyte
sequences. Changes to is_alnum_mbchar(), is_blank_mbchar(),
is_cntrl_mbchar(), is_punct_mbchar(), control_mbrep(),
mbwidth(), make_mbchar(), parse_mbchar(), mbstrncasecmp(),

View File

@ -139,7 +139,7 @@ bool is_cntrl_mbchar(const char *c)
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
wc = bad_wchar;
}
return is_cntrl_wchar(wc);