# Letters with accent marks

**URL:** <https://www.ruby-forum.com/t/letters-with-accent-marks/120452>\
**Category:** Ruby\
**Created:** [November 17, 2007, 1:58am UTC](https://www.ruby-forum.com/t/letters-with-accent-marks/120452 "2007-11-17T01:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [November 17, 2007, 1:58am UTC](https://www.ruby-forum.com/t/letters-with-accent-marks/120452/1 "2007-11-17T01:58:18Z")

</div>

Any ideas?

I have a textBox that users will be entering data into and most likely  
they will not bother to write the accent marks over the correct letters.  
When performing the search I need a way to look at the words in the  
database and say does it have a accent mark over it and if so ignore it  
and render it as a, e, i, o, u. I tried to copy and paste these letters  
with accent marks into the file but the program doesnt recognize them.

Any idea how to test for i with an accent mark, a with an accent mark,  
etc…

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [November 17, 2007, 10:58am UTC](https://www.ruby-forum.com/t/letters-with-accent-marks/120452/2 "2007-11-17T10:58:37Z")

</div>

On Nov 17, 2007 1:58 AM, Hickman H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> etc…  
> I guess Iconv library is able to convert any encoding to plain ascii.

[http://www.ruby-doc.org/stdlib/libdoc/iconv/rdoc/index.html](http://www.ruby-doc.org/stdlib/libdoc/iconv/rdoc/index.html)

you can try it online at [http://www.iconv.com/iconv.htm](http://www.iconv.com/iconv.htm)

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [November 18, 2007, 5:24am UTC](https://www.ruby-forum.com/t/letters-with-accent-marks/120452/3 "2007-11-18T05:24:55Z")

</div>

On Nov 16, 2007 6:58 PM, Hickman H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> etc…  
> If it’s an issue with your text editor, you can put the escaped octal  
> version in.  
> For example, if you want to remove all acute accents, try this  
> str.gsub! “\303\241”,‘a’  
> str.gsub! “\303\251”,‘e’  
> str.gsub! “\303\255”,‘i’  
> str.gsub! “\303\263”,‘o’  
> str.gsub! “\303\272”,‘u’

-Daniel Brumbaugh K.
