# gsub With unicode characters

**URL:** <https://discuss.rubyonrails.org/t/gsub-with-unicode-characters/22993>\
**Category:** rubyonrails-talk\
**Created:** [January 10, 2008, 8:55pm UTC](https://discuss.rubyonrails.org/t/gsub-with-unicode-characters/22993 "2008-01-10T20:55:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [January 10, 2008, 8:55pm UTC](https://discuss.rubyonrails.org/t/gsub-with-unicode-characters/22993/1 "2008-01-10T20: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!(/é/, '&#233;')

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!
