libedit/libedit-wchar.patch

18 lines
612 B
Diff
Raw Normal View History

2015-03-18 17:30:59 +00:00
diff -rup libedit-20141029-3.1-bak/src/eln.c libedit-20141029-3.1/src/eln.c
--- libedit-20141029-3.1-bak/src/eln.c 2015-03-14 09:19:41.804370242 +0100
+++ libedit-20141029-3.1/src/eln.c 2015-03-15 08:58:36.182162570 +0100
@@ -76,9 +76,11 @@ el_gets(EditLine *el, int *nread)
{
const wchar_t *tmp;
- el->el_flags |= IGNORE_EXTCHARS;
+ if (!(el->el_flags & CHARSET_IS_UTF8))
+ el->el_flags |= IGNORE_EXTCHARS;
tmp = el_wgets(el, nread);
- el->el_flags &= ~IGNORE_EXTCHARS;
+ if (!(el->el_flags & CHARSET_IS_UTF8))
+ el->el_flags &= ~IGNORE_EXTCHARS;
return ct_encode_string(tmp, &el->el_lgcyconv);
}