Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to perform an accent independent search with textpattern?
Hi
I noticed that the search in txp is accent sensitive (é and e are différent) when i googled that i found that the interclassement of mysql table can solve that but when i looked to phpmyadmin i only have things like *_ci that means case incensitive!
After googling more i found that code that convert the search to accent insensitive:
SELECT * FROM `table` WHERE `texte` LIKE CONVERT(_utf8 '%cinema%' USING utf8) COLLATE utf8_general_ci ;
Can someone tel me how to change the publish.php to reflect that? or if someone have a better solution?
Thanks
Offline
Re: How to perform an accent independent search with textpattern?
Hi again
no one have an idea or a suggestion?
Offline
Re: How to perform an accent independent search with textpattern?
After some trying with dbmanager i find that the request that feet my need is
Select * from textpattern where Title like "%thesearch%";
But looking into txp code (a doArticle function that’s not easy to inderstund the internal logic for me) i found that it use rlike function, changing it to like and putting % around $q havent worked!!
Haven’t been able to find a solution with internal search turn me to look to another solution using smd_query, if i succeed i will post the resulte!
Cheers
Offline
Re: How to perform an accent independent search with textpattern?
Does it work with the latest SVN version of TXP? Sam revamped the search and converted it from rlike
to like
in the process.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: How to perform an accent independent search with textpattern?
Yeaaah Thanks man you are a chief
Even if using a development version with a production site is not recommended, but that solve my problem and it works like a charm!!
I can handle now others stuff
Thanks again Stef.
Offline
Re: How to perform an accent independent search with textpattern?
Dragondz wrote:
Yeaaah Thanks man you are a chief
No probs. Sam’s the genius here :-)
Incidentally, I’m in the process of trying to convert the admin-side article search over to like as well. Ironing out some stumbling blocks with wildcards and foreign character searches so we can (perhaps) issue the fix soon. Watch that space.
Last edited by Bloke (2010-03-16 12:00:25)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline