getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

'ignore_accented_characters' has no effect #141

Open ThosG opened 6 years ago

ThosG commented 6 years ago

café does not match cafe. If the search string has an accent but the target doesn't (café to cafe), or the other way around (cafe to café), there is no match.

techws-dev commented 3 years ago

I got the same issue with that option not working, I came to a workaround in file simplesearch.php in function matchText(), replacing :

setlocale(LC_ALL, 'en_US');

with :

setlocale(LC_ALL, 'en_US.utf8');

I don't know if this is solving the issue on all environments, so if somebody can confirm it would be nice.

Fazarel commented 1 year ago

I don't know if this is solving the issue on all environments, so if somebody can confirm it would be nice.

It works for me on Ubuntu 20.04.1 LTS, tanks @techws-dev !