Bug in encoding: utf8 ?

Hello,

Today, I had to show some of the work done to my supervisor. When I wanted to show that all the tests ran correctly iI just 'raked' as usual. However, every single unit test had an error. Off course that only happens when you have to do a demonstration.

The problem however, was quickly discovered. I added yesterday 'encoding: utf8' to database.yml (MySql 5.0.22) to correctly show some non-ascii characters, which works perfectly. After removing this rule, all tests ran correctly.

The application itself had no problems with the new rule. Is this a known bug? If so, is there a fix. I'm running Rails 1.2.

Are all of your test scripts using UTF-8 string literals?

Rails 1.2 has a Chars class for UTF-8 text. Unlike kCODE which modifies the Ruby string class methods to process UTF characters correctly.