diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-05-22 15:47:56 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-05-22 15:47:56 +0200 |
commit | 5bbe8607b4eff874efd85e357450c46a6f7c7593 (patch) | |
tree | 797f18f0dbd2fd4913a9007544f8e6afc2ec5c22 /source/fitz | |
parent | 3c4bd6130b6e2ff423e38654e0dcc8502f22274a (diff) | |
download | mupdf-5bbe8607b4eff874efd85e357450c46a6f7c7593.tar.xz |
Fix 695222: Treat non-breaking space (U+00A0) as white space for search.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/stext-search.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |