Search don't return results with special chars

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
local_host
New Member
New Member
Posts: 3
Joined: Fri Aug 01, 2008 1:05 am

Search don't return results with special chars

Post 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.
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am

Re: Search don't return results with special chars

Post 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.
local_host
New Member
New Member
Posts: 3
Joined: Fri Aug 01, 2008 1:05 am

Re: Search don't return results with special chars

Post 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.
faglork

Re: Search don't return results with special chars

Post 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
Last edited by faglork on Wed Aug 13, 2008 6:39 am, edited 1 time in total.
local_host
New Member
New Member
Posts: 3
Joined: Fri Aug 01, 2008 1:05 am

Re: Search don't return results with special chars

Post by local_host »

Hey! :)

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

Thanks!
Post Reply

Return to “CMSMS Core”