Jump to content

Search and problem with Scandinavian letters (ä, ö, ...)


Hurme
 Share

Recommended Posts

I'm using Ryans default site profile search as a starting point. Only thing I've modified is what fields the search looks into.

The site is in finnish and I've run into problems with Scandinavian letters like ä and ö.

1) The search "öö" will find results "oo" which it obviously shouldn't

2) The search seems to add quotation marks " around those letters. Which causes problems in multiple ways. 

2.1) I've set the search query to fail if it isn't at least 3 letters long. With quotation marks öö becomes "öö" and so it passes this test, which is not good.

2.2) If the search result doesn't find anything it returns "Your search "query here" didn't find anything." With Scandinavian letters It becomes: "Your search ""öö"" didn't find anything. Which is also not good. Although I can get around this by removing the quotation marks before it prints them it's only a bandaid to something that shouldn't be happening in the first place.

Setlocale has been set to fi_FI.UTF8 in config.php, but I'm not honestly sure how to test this, and I don't know if it connected to this issue.

I've tried to look into this for a while now, but with little results. Anyone got any good ideas?

Link to comment
Share on other sites

Hi there! 

Backup your database and try changing database table collations to utf8_swedish_ci.  In addition this solves some sorting issues with words starting with Å, Ä or Ö.

  • Like 2
Link to comment
Share on other sites

Hello Sergio,

I'm not so sure this has anything to do with the collation, but I will try few more. How ever I've never run into this problem before with different content management systems, nor with Processwire when using different forms.

Link to comment
Share on other sites

I went through quite a few of the collations but none of them had any effect. Just to confirm, you guys think this is still a database problem? If so I'll try to find a solution and post it here if I manage to stumble onto something.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...