grav-plugin-simplesearch icon indicating copy to clipboard operation
grav-plugin-simplesearch copied to clipboard

'ignore_accented_characters' has no effect

Open ThosG opened this issue 7 years ago • 2 comments

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.

ThosG avatar Jan 12 '18 09:01 ThosG

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.

techws-dev avatar Dec 01 '20 18:12 techws-dev

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 !

Fazarel avatar Feb 04 '23 11:02 Fazarel