Jump to content
Hurme

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

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hi,

It was utf8_general_ci before. I changed it to swedish but this did not have any effect and the problem continues. Thanks for trying though. 🙂

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...