Ensure that the same encoding / encoding set is specified in the column, database, and application.
- MySQL:
http://dev.mysql.com/doc/refman/5.7/en/charset-column.html - ActiveRecord:
ActiveRecord::Base.connection.collation - Rails
config.encoding sets up the application-wide encoding. Defaults to UTF-8.
str.force_encoding("UTF-8")