Solving encoding issues that arises with rails 3.2