summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lefevre <vincent@vinc17.net>2016-08-23 13:32:31 +0200
committerVincent Lefevre <vincent@vinc17.net>2016-08-23 13:32:31 +0200
commit93b33e41b06e1070f7a09ae1eb0b0ce859609eb3 (patch)
tree82b51c30be6721823247c31982799b65ed15d4e2
parent1d59ab26a1e4691c02f9e9e8640e3d0ef11fd21d (diff)
Filter out zero width no-break space (U+FEFF).
-rw-r--r--mbyte.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mbyte.c b/mbyte.c
index 3df143f5..8d5d075c 100644
--- a/mbyte.c
+++ b/mbyte.c
@@ -530,6 +530,7 @@ int is_display_corrupting_utf8 (wchar_t wc)
if (wc == (wchar_t)0x200f || /* bidi markers: #3827 */
wc == (wchar_t)0x200e ||
wc == (wchar_t)0x00ad || /* soft hyphen: #3848 */
+ wc == (wchar_t)0xfeff || /* zero width no-break space */
(wc >= (wchar_t)0x202a && /* misc directional markers: #3854 */
wc <= (wchar_t)0x202e))
return 1;