mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Filter directional markers that corrupt the screen. (closes #3854)

Thanks to Vincent Lefèvre for working on these utf-8 screen display issues.

+15 -9
+13 -6
mbyte.c
··· 525 525 return Charset_is_utf8 ? 0xfffd : '?'; 526 526 } 527 527 528 + int is_display_corrupting_utf8 (wchar_t wc) 529 + { 530 + if (wc == (wchar_t)0x200f || /* bidi markers: #3827 */ 531 + wc == (wchar_t)0x200e || 532 + wc == (wchar_t)0x00ad || /* soft hyphen: #3848 */ 533 + (wc >= (wchar_t)0x202a && /* misc directional markers: #3854 */ 534 + wc <= (wchar_t)0x202e)) 535 + return 1; 536 + else 537 + return 0; 538 + } 539 + 528 540 int mutt_filter_unprintable (char **s) 529 541 { 530 542 BUFFER *b = NULL; ··· 548 560 } 549 561 if (!IsWPrint (wc)) 550 562 wc = '?'; 551 - /* Filter out the RIGHT-TO-LEFT and LEFT-TO-RIGHT bidi markers because 552 - * they result in screen corruption. See ticket #3827. 553 - * Filter soft-hypen. See ticket #3848. 554 - */ 555 563 else if (Charset_is_utf8 && 556 - ((wc == (wchar_t)0x200f) || (wc == (wchar_t)0x200e) || 557 - (wc == (wchar_t)0x00ad))) 564 + is_display_corrupting_utf8 (wc)) 558 565 continue; 559 566 k2 = wcrtomb (scratch, wc, &mbstate2); 560 567 scratch[k2] = '\0';
+1
mbyte.h
··· 49 49 extern int Charset_is_utf8; 50 50 size_t utf8rtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *_ps); 51 51 wchar_t replacement_char (void); 52 + int is_display_corrupting_utf8 (wchar_t wc); 52 53 53 54 #endif /* _MBYTE_H */
+1 -3
pager.c
··· 1156 1156 dprint (3, (debugfile, "skip zero-width character U+%04X\n", (unsigned short)wc)); 1157 1157 continue; 1158 1158 } 1159 - /* Filter bidi markers, see ticket #3827 1160 - Filter soft hyphen, see ticket #3848 */ 1161 - if (wc == (wchar_t)0x200f || wc == (wchar_t)0x200e || wc == (wchar_t)0x00ad) 1159 + if (is_display_corrupting_utf8 (wc)) 1162 1160 { 1163 1161 dprint (3, (debugfile, "filtered U+%04X\n", (unsigned short)wc)); 1164 1162 continue;