From: Richard Russon Date: Sat, 20 Jan 2018 02:48:41 +0000 (+0000) Subject: name unicode chars X-Git-Tag: neomutt-20180223~30^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad14059468df0fcc9fffcad37ab50c0d3439041d;p=neomutt name unicode chars --- diff --git a/mutt/charset.c b/mutt/charset.c index eeef3b41d..5557fe31e 100644 --- a/mutt/charset.c +++ b/mutt/charset.c @@ -939,7 +939,7 @@ void mutt_ch_set_charset(char *charset) if (mutt_ch_is_utf8(buffer)) { Charset_is_utf8 = true; - ReplacementChar = 0xfffd; + ReplacementChar = 0xfffd; /* replacement character */ } else { diff --git a/pager.c b/pager.c index 806964e90..eed2b1e35 100644 --- a/pager.c +++ b/pager.c @@ -1258,6 +1258,7 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, int f if (Charset_is_utf8) { + /* zero width space, zero width no-break space */ if (wc == 0x200B || wc == 0xFEFF) { mutt_debug(3, "skip zero-width character U+%04X\n", (unsigned short) wc); @@ -1315,10 +1316,14 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, int f last_special = special; } + /* no-break space, narrow no-break space */ if (IsWPrint(wc) || (Charset_is_utf8 && (wc == 0x00A0 || wc == 0x202F))) { if (wc == ' ') + { space = ch; + } + /* no-break space, narrow no-break space */ else if (Charset_is_utf8 && (wc == 0x00A0 || wc == 0x202F)) { /* Convert non-breaking space to normal space. The local variable