suggested by Bill Soudan)
- Remove the -D/--dos and -M/--mac command line options, as they
aren't much use with the new file format autodetection. (DLR)
- - Add support for reading in UTF-8 sequences to some of the
- low-level input routines. Changes to get_kbinput() and
+ - Add support for reading in UTF-8 sequences to the low-level
+ input routines. Changes to get_kbinput() and
get_translated_kbinput(). (DLR)
- files.c:
do_insertfile()
break;
#endif
default:
- /* A character with its high bit set: UTF-8
- * sequence mode. Set seq to UTF8_SEQ. */
- if ((-128 <= kbinput && kbinput < 0) ||
- (127 < kbinput && kbinput <= 255))
- *seq = UTF8_SEQ;
-
retval = kbinput;
break;
}
}
}
+ /* A character other than ERR with its high bit set: UTF-8 sequence
+ * mode. Set seq to UTF8_SEQ. */
+ if (retval != ERR && 127 < retval && retval <= 255)
+ *seq = UTF8_SEQ;
+
#ifdef DEBUG
fprintf(stderr, "get_translated_kbinput(): kbinput = %d, seq = %d, escapes = %d, ascii_digits = %lu, retval = %d\n", kbinput, (int)*seq, escapes, (unsigned long)ascii_digits, retval);
#endif