# Problem searching with special characters

**URL:** <https://www.ruby-forum.com/t/problem-searching-with-special-characters/96364>\
**Category:** Ferret\
**Created:** [June 28, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/problem-searching-with-special-characters/96364 "2006-06-28T12:42:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawillis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Post date:** [June 28, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/problem-searching-with-special-characters/96364/1 "2006-06-28T12:42:41Z")

</div>

I’m using Ferret on a Swedish website and I get some unexpected  
behaviour on searches containing the swedish charchters Ã¥Ã¤Ã¶.

An exampel, if I index a string “VarfÃ¶r fungerar det inte” (“Why doesnt  
it work” in swedish) and search for “fÃ¶r” I’ll get one (1) match. The  
expected behaviour would be no matches since ‘fÃ¶r’ is part of the word  
‘varfÃ¶r’.

And if I do a search for “varfÃ¶\*” it returns no matches. Expecting one.

My guess is that it has something to do with the UTF-8 encoding but I  
can’t seem to figure out exactly what is is…

I’m using the StandardAnalyzer b.t.w.

Any ideas?

Thanks

/David

---

<div class="post-metadata">

**Author:** ![dawillis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Post date:** [June 28, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/problem-searching-with-special-characters/96364/2 "2006-06-28T17:06:31Z")

</div>

Hi David,

Are you using Windows? Ferret on Windows won’t handle UTF-8  
unfortunately. If not, could you check your locale? “puts  
Ferret.locale”. You can try setting the locale too. Let me know if you  
are still having problems.

Cheers,  
Dave

---

<div class="post-metadata">

**Author:** ![dawillis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Post date:** [November 9, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/problem-searching-with-special-characters/96364/3 "2006-11-09T14:49:11Z")

</div>

Hi

Did you find a solution? - I have the same problem but with danish.

/mattias
