SMF Support > SMF 2.0.x Support

Accented characters in Search

<< < (2/2)

vercingetorix:
Assuming I'm looking in the right place (Admin/Configuration/Languages/Edit Languages) then the forum uses en-US ISO-8859-1. I see that I could use SMF 2.0.2 english-utf8. What difference would this make? Many thanks in advance for your help, by the way. The forum address is: hxxp:www.unsungcomposers.com [nonactive].

Arantor:
Actually, let me correct that. You have ISO-8859-1 installed (because the base English set is also ISO-8859-1) but you're actually using UTF-8 as you should be.

That still doesn't give nearly enough information for how it will work, though. What search method are you using? (It's in the admin panel somewhere) There's 'no index', fulltext and custom indexes, plus Sphinx as a plugin.

Also, do you have the mbstring extension installed?

(You know, you could just try it to see how it behaves...)

MrPhil:
Unless it's something built into MySQL (or whichever database you're using), I don't think that SMF itself will also look for Bluecher or Blucher if Blücher is requested, and vice-versa. At least, I don't recall seeing any such code. SMF uses the LIKE keyword in SQL queries, so either MySQL would have to be configured to handle it (is that possible?) or SMF would have to be extended to make multiple search terms (post_content LIKE "Blucher" OR post_content LIKE "Bluecher" OR post_content LIKE "Blücher"). That could lead to unexpected behavior, especially in non-European languages, so there should be a search-time switch to request such behavior.

Arantor:
This is why I wanted to know which search method.

If non-indexed is used, LIKE is applied - which is case insensitive (as handled by MySQL), but does no folding of letters.
If custom index is used, it's case insensitive if mbstring is present or maybe not so much if not, but again does no folding of letters from what I remember.
If fulltext is used, it may be folded depending on some MySQL settings.
If Sphinx is used, you can expressly tell it to fold characters in whatever fashion you want.

vercingetorix:
I'm getting in over my head here, but thanks very much for taking the time to respond. The search method was FullText, but this was giving incomplete results, so I changed it to Custom Index and that produces much more accurate and comprehensive results. I have no idea what mbstring is, never mind if it is present, or what my MySQL settings are..

If I compile (as I have done for another web site) a search engine then I can specify how it treats accented letters, "sounds like", wildcard characters and so on. I was hoping that somewhere there'd be a straightforward guide to how SMF search treated such things by default. The implication of what you're saying is that it depends upon my MySQL settings...

Navigation

[0] Message Index

[*] Previous page

Go to full version