1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

terminal: Decode UTF-8 only from bytes, not from codes of special keys.

This commit is contained in:
Kalle Olavi Niemitalo 2006-08-05 13:42:08 +03:00 committed by Miciah Dashiel Butler Masters
parent ef2f6383c6
commit 50603fc66c

View File

@ -272,7 +272,7 @@ handle_interlink_event(struct terminal *term, struct term_event *ev)
#endif /* CONFIG_UTF_8 */
if (interlink->utf_8.len) {
if ((key & 0xC0) == 0x80 && utf8_io) {
if (key >= 0x80 && key <= 0xBF && utf8_io) {
interlink->utf_8.ucs <<= 6;
interlink->utf_8.ucs |= key & 0x3F;
if (! --interlink->utf_8.len) {