# Gsub With unicode characters

**URL:** <https://www.ruby-forum.com/t/gsub-with-unicode-characters/125641>\
**Category:** Rails\
**Created:** [January 10, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/gsub-with-unicode-characters/125641 "2008-01-10T21:55:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nayru](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@nayru](https://www.ruby-forum.com/u/nayru)\
**Post date:** [January 10, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/gsub-with-unicode-characters/125641/1 "2008-01-10T21:55:48Z")

</div>

Hi

I am writing a RoR application that needs to work with a database full  
of french unicode characters, unfortunately whenever I try to display a  
field with those values in a show I just get a question mark or no  
character displayed.

So I decided to run a gsub (there’s only 2 fields with this problem) on  
the field before displying it to replace the characters with their HTML  
equivalents, for example:  
french\_name.gsub!(/Ã©/, ‘é’)

However this does not appear to work, I’ve tried a few different methods  
for the regex after some googling but nothing seems to be doing the  
trick…

If anyone has any ideas I’d appreciate your help!

Thanks!
