Page 1 of 1

Search don't return results with special chars

Posted: Tue Aug 05, 2008 11:29 pm
by local_host
Hello, everyone.

I'm stuck in the middle of my project with some kind of degenerative disease concerning special chars. I've really already tried to search here in the forum, but the questions are not exactly the same as mine.

Well, I've started posting a test message ("testã") within the default news module test message. Then, when I search "testa" I just don't get any results.
I've tested with phpmyadmin (and already read all complains about it) and what I see is something like "testç" on the message's body.

What the heck am I doin' wrong? I've tried a bunch of collations and charsets, but still can't get the expected result.

Can anyone help me?


PS: Sorry for the poor English, ok? And thanks in advance.

Re: Search don't return results with special chars

Posted: Wed Aug 06, 2008 7:06 am
by stopsatgreen
If you search for "testa" there are no results because the word in the database is "testã", which is not the same. If you search for "testã", the correct result should be returned.

The CMSMS search is not as sophisticated as Google, so it doesn't recognise character alternatives. You should file a bug in the Search module (http://dev.cmsmadesimple.org/projects/search/) if you think it should be changed.

Re: Search don't return results with special chars

Posted: Sat Aug 09, 2008 2:51 pm
by local_host
Yep, the search is not sophisticated as Google's, but something i've tried did change in the database. If I change the article edit page's encoding to windows-1252, then the search for "testa" return the results, including "testã" (AND phpmyadmin shows the correct char).

Is possible to make it work changing adodb's core (including "utf8_encode/_decode()" before sending and after reiceving data from db), but it's too much invasive and is not the answer I'm looking for.

Re: Search don't return results with special chars

Posted: Mon Aug 11, 2008 10:12 am
by faglork
Hi!

I had the same problem with German umlauts. The solution:

- use UTF-8 encoding throughout
- use TinyMCE as wysiwyg editor
- configure TinyMCE to use RAW coding

Works like a charm.

hth,
Alex

Re: Search don't return results with special chars

Posted: Tue Aug 12, 2008 8:26 pm
by local_host
Hey! :)

Gonna try it!
Working or not, I'll be back tomorrow.

Thanks!