diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-11-11 00:21:20 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-11-11 00:21:20 +0000 |
| commit | 892c3647e44b98d5edf8ba0e92a67b68aa2e57c6 (patch) | |
| tree | b048b12335d3655efc1538cc53854ddef2fab0e8 /src/ranked_match.cc | |
| parent | 7bd3f4306ddb030d6f7c70f3bcb0fa4e9b6ac4b4 (diff) | |
Fix to_lower/to_upper handling to correctly support non unicode chars
require a proper unicode locale setup on the system
Fixes #94
Diffstat (limited to 'src/ranked_match.cc')
| -rw-r--r-- | src/ranked_match.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ranked_match.cc b/src/ranked_match.cc index a55df314..a7fd4fb3 100644 --- a/src/ranked_match.cc +++ b/src/ranked_match.cc @@ -24,7 +24,7 @@ static int count_word_boundaries_match(StringView candidate, StringView query) if (not is_word_boundary) continue; - const Codepoint lc = tolower(c); + const Codepoint lc = to_lower(c); for (; qit != query.end(); ++qit) { const Codepoint qc = *qit; @@ -43,7 +43,7 @@ static int count_word_boundaries_match(StringView candidate, StringView query) static bool smartcase_eq(Codepoint query, Codepoint candidate) { - return query == (islower(query) ? tolower(candidate) : candidate); + return query == (islower(query) ? to_lower(candidate) : candidate); } static bool subsequence_match_smart_case(StringView str, StringView subseq) |
