# Activerecord utf8 special characters odd behavior

**URL:** <https://www.ruby-forum.com/t/activerecord-utf8-special-characters-odd-behavior/90949>\
**Category:** Rails\
**Created:** [April 3, 2007, 7:32am UTC](https://www.ruby-forum.com/t/activerecord-utf8-special-characters-odd-behavior/90949 "2007-04-03T07:32:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 3, 2007, 7:32am UTC](https://www.ruby-forum.com/t/activerecord-utf8-special-characters-odd-behavior/90949/1 "2007-04-03T07:32:21Z")

</div>

Since upgrading to Rails 1.2.\* my ActiveRecord has not been acting  
properly:

When I perform a .find and give a UTF8 string as a conditional, the  
select statement gives me the following:

SELECT \* FROM albums WHERE (name = ‘Medúlla’)

When I perform a .save on a model UTF8 and other characters ( . ! )  
get stripped out of the query:

INSERT INTO albums (`name`) VALUES(‘Medlla’)

The database encoding is set to utf8 in the database.yml file.  
character\_set\_database and character\_set\_system are both set to utf8  
in the mysql database.

Thoughts?
