Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Case insensitive search #206

Closed
new-kirte opened this issue Apr 12, 2016 · 4 comments
Closed

Case insensitive search #206

new-kirte opened this issue Apr 12, 2016 · 4 comments

Comments

@new-kirte
Copy link

The search in non-English languages (e.g. Russian) is case sensitive. Can it be changed to be case insensitive, please?

@rvolz rvolz added the bug label Apr 12, 2016
@rvolz
Copy link
Owner

rvolz commented Apr 12, 2016

It shouldn't be, but I see now that the function strtolower has its limits for cyrillic languages. I'll change that.

Could you provide me with some test cases, e.g upper case strings and lower case equivalents?

@new-kirte
Copy link
Author

@rvolz rvolz added enhancement and removed bug labels Apr 25, 2016
@rvolz
Copy link
Owner

rvolz commented Apr 25, 2016

I tested and discovered that this isn't a bug, but a restriction of current Sqlite distributions (the database that Calibre uses). By default it works with ASCII. To change that you would have to load an extension enabling Unicode. Unfortunately that extension isn't included in most installations.

I'll try to find a workaround.

rvolz added a commit that referenced this issue Apr 26, 2016
The standard SQLite distribution doesn't work fully with Unicode texts, eg functions like lower and upper don't transform Unicode strings properly.  Sincle loading the ICU extension for SQLite -- which could solve this problem -- seems to be a problem with most distributions currently, there is now a workaround that transform the search expression into lower- and title-case forms, and then uses both to search for items. Unicode names that were not transformed into lower case should be matched (mostly) by the title-case search expression.
@rvolz
Copy link
Owner

rvolz commented Apr 26, 2016

There is now a workaround that could help. Could you please test this version?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants