Studing JRuby and Rails I faced some encoding problems. The solution was very easy. First you must have to create your database using utf8 character set. In case you are using MySQL, just do the following:
CREATE DATABASE `yourdatabasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER DATABASE yourdatabasename CHARACTER SET utf8 COLLATE utf8_general_ci;
In my case, I’m using the activerecord-jdbc-adapter gem, and connecting to the database through the MySQL JDBC Connector (http://www.mysql.com/downloads/connector/j/).
At this[Read more...]