owncloud-archive / news

:newspaper: News app for ownCloud
GNU Affero General Public License v3.0
290 stars 106 forks source link

Non-latin search is case sensitive #944

Closed Loki3000 closed 8 years ago

Loki3000 commented 8 years ago

Explain the Problem

Search feeds with non-latin chars is case sensitive.

Steps to Reproduce

in search field type одного and hit Enter

Expected:

filter the entity

Одного из израильских генералов спросили, можно ли простить террориста?
На это он ответил:
— Бог простит. Наша задача организовать их встречу.

Actual:

Empty result

System Information

BernhardPosselt commented 8 years ago

Feel free to submit a fix, I unfortunately can not test this very well on a Latin only keyboard. Relevant section should be here: https://github.com/owncloud/news/blob/master/db/itemmapper.php#L71

Solution is probably to replace strtolower with mb_strtolower, please try if this works and submit a pull request

BernhardPosselt commented 8 years ago

Ah right, same issue here where it creates the index https://github.com/owncloud/news/blob/master/db/item.php#L219

BernhardPosselt commented 8 years ago

You will need to readd the feed to check if it worked btw

Loki3000 commented 8 years ago

Thanks! Now search works well.

BernhardPosselt commented 8 years ago

Can you create a pull request to fix it for everyone ;D?