# Should "a" match "Ã¤" in ferret?

**URL:** <https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987>\
**Category:** Ferret\
**Created:** [August 14, 2007, 2:24am UTC](https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987 "2007-08-14T02:24:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![builderchad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@builderchad](https://www.ruby-forum.com/u/builderchad)\
**Post date:** [August 14, 2007, 2:24am UTC](https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987/1 "2007-08-14T02:24:54Z")

</div>

Hi all,

I have indexed a huge amount of data with text from several european  
languages. In the index are values like Georg Friedrich HÃ¤ndel.

I would like a search phrase like “Georg Friedrich Handel” to find  
records with the real spelling of HÃ¤ndel but it doesn’t seem to work.

Can anyone give me an idea of what I need to do to make this happen. A  
bit lost here and can’t seem to find anything on google to help out. I  
have an idea that it might be a locale issue but not sure.

Thanks,

Chad.

---

<div class="post-metadata">

**Author:** ![builderchad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@builderchad](https://www.ruby-forum.com/u/builderchad)\
**Post date:** [August 14, 2007, 3:22am UTC](https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987/2 "2007-08-14T03:22:37Z")

</div>

I’m a 100% sure this has been asked before in this list. But I know  
it’s not exactly trivial to search for it.

I’d say, give it a try on the archives.

[http://rubyforge.org/pipermail/ferret-talk/](http://rubyforge.org/pipermail/ferret-talk/)

---

<div class="post-metadata">

**Author:** ![builderchad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@builderchad](https://www.ruby-forum.com/u/builderchad)\
**Post date:** [August 14, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987/3 "2007-08-14T14:18:55Z")

</div>

Chad,

you should use a mapping filter to transform special characters like  
german umlauts into its ascii counterpiece.

take a look out this analyzer, maybe it helps …

[http://bugs.omdb.org/browser/branches/2007.1/lib/omdb/ferret/analysis.rb](http://bugs.omdb.org/browser/branches/2007.1/lib/omdb/ferret/analysis.rb)

Ben

---

<div class="post-metadata">

**Author:** ![builderchad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@builderchad](https://www.ruby-forum.com/u/builderchad)\
**Post date:** [August 15, 2007, 5:30am UTC](https://www.ruby-forum.com/t/should-a-match-a-in-ferret/111987/4 "2007-08-15T05:30:33Z")

</div>

On Tue, Aug 14, 2007 at 02:24:54AM +0200, Chad T. wrote:

> have an idea that it might be a locale issue but not sure.  
> To achieve this, simply replace all occurences of ‘ä’ by ‘a’ in both  
> indexed content and queries.  
> MappingFilter [1] is your friend 🙂

Cheers,  
Jens

[1]  
[http://ferret.davebalmain.com/api/classes/Ferret/Analysis/MappingFilter.html](http://ferret.davebalmain.com/api/classes/Ferret/Analysis/MappingFilter.html)

–  
Jens Krämer  
[http://www.jkraemer.net/](http://www.jkraemer.net/) - Blog  
[http://www.omdb.org/](http://www.omdb.org/) - The new free film database
