From 5bbe8607b4eff874efd85e357450c46a6f7c7593 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 May 2014 15:47:56 +0200 Subject: Fix 695222: Treat non-breaking space (U+00A0) as white space for search. --- source/fitz/stext-search.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/stext-search.c b/source/fitz/stext-search.c index f1f0d203..29f51e64 100644 --- a/source/fitz/stext-search.c +++ b/source/fitz/stext-search.c @@ -3,6 +3,7 @@ static inline int fz_tolower(int c) { /* TODO: proper unicode case folding */ + /* TODO: character equivalence (a matches รค, etc) */ if (c >= 'A' && c <= 'Z') return c - 'A' + 'a'; return c; @@ -10,7 +11,7 @@ static inline int fz_tolower(int c) static inline int iswhite(int c) { - return c == ' ' || c == '\r' || c == '\n' || c == '\t'; + return c == ' ' || c == '\r' || c == '\n' || c == '\t' || c == 0xA0 || c == 0x2028 || c == 0x2029; } fz_char_and_box *fz_text_char_at(fz_char_and_box *cab, fz_text_page *page, int idx) -- cgit v1.2.3