From d31c2a63f2cc4609357f80d4b0fc0e6d30eca109 Mon Sep 17 00:00:00 2001 From: Rocco Rutte Date: Mon, 18 Aug 2008 10:24:20 +0200 Subject: [PATCH] Ignore zero width characters U+200B/U+FEFF which may garble the display. Closes #3061, #3048. --- pager.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pager.c b/pager.c index c88b5d4c2..0a7509cc0 100644 --- a/pager.c +++ b/pager.c @@ -1106,6 +1106,12 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, if (k == 0) k = 1; + if (Charset_is_utf8 && (wc == 0x200B || wc == 0xFEFF)) + { + dprint (3, (debugfile, "skip zero-width character U+%04X\n", wc)); + continue; + } + /* Handle backspace */ special = 0; if (IsWPrint (wc)) -- 2.50.0