<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">85</assigned-user-id>
  <attachments-count type="integer">3</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-07-08T13:26:48+01:00</created-at>
  <creator-id type="integer">38023</creator-id>
  <milestone-due-on type="datetime">2009-08-31T00:00:00+01:00</milestone-due-on>
  <milestone-id type="integer">41987</milestone-id>
  <number type="integer">2883</number>
  <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
  <priority type="integer">16</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>committed</state>
  <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
  <title>Diacritics break validates_uniqueness_of on MySQL</title>
  <updated-at type="datetime">2009-08-09T19:56:43+01:00</updated-at>
  <user-id type="integer">17393</user-id>
  <user-name>Repository</user-name>
  <creator-name>awendt</creator-name>
  <assigned-user-name>Jeremy Kemper</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
  <milestone-title>2.3.4</milestone-title>
  <original-body>Consider this Person model on Rails 2.3.2:

  class Person &lt; ActiveRecord::Base

    validates_uniqueness_of :name

  end

This lets me create two people with the name 'andr&#233;', and the second person gets an ActiveRecord::StatementInvalid. The same code on Sqlite works fine.

This is because the MySQL adapter issues

  SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&#233;') LIMIT 1

while Sqlite gets

  SELECT &quot;people&quot;.id FROM &quot;people&quot; WHERE (&quot;people&quot;.&quot;name&quot; = 'andr&#233;') LIMIT 1

Code to reproduce is on http://github.com/awendt/validates_uniqueness_with_diacritics.

  SHOW CREATE TABLE people:

+--------+----------------------------------------------------------
| Table  | Create Table|
+--------+----------------------------------------------------------
| people | CREATE TABLE `people` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) default NULL,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
+--------+----------------------------------------------------------

Character set and collation seem fine. This is on OSX.</original-body>
  <latest-body>Consider this Person model on Rails 2.3.2:

  class Person &lt; ActiveRecord::Base

    validates_uniqueness_of :name

  end

This lets me create two people with the name 'andr&#233;', and the second person gets an ActiveRecord::StatementInvalid. The same code on Sqlite works fine.

This is because the MySQL adapter issues

  SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&#233;') LIMIT 1

while Sqlite gets

  SELECT &quot;people&quot;.id FROM &quot;people&quot; WHERE (&quot;people&quot;.&quot;name&quot; = 'andr&#233;') LIMIT 1

Code to reproduce is on http://github.com/awendt/validates_uniqueness_with_diacritics.

  SHOW CREATE TABLE people:

+--------+----------------------------------------------------------
| Table  | Create Table|
+--------+----------------------------------------------------------
| people | CREATE TABLE `people` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) default NULL,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
+--------+----------------------------------------------------------

Character set and collation seem fine. This is on OSX.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;Consider this Person model on Rails 2.3.2:&lt;/p&gt;
&lt;p&gt;class Person &amp;lt; ActiveRecord::Base&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;validates_uniqueness_of :name
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;This lets me create two people with the name 'andr&amp;eacute;', and
the second person gets an ActiveRecord::StatementInvalid. The same
code on Sqlite works fine.&lt;/p&gt;
&lt;p&gt;This is because the MySQL adapter issues&lt;/p&gt;
&lt;p&gt;SELECT &lt;code&gt;people&lt;/code&gt;.id FROM &lt;code&gt;people&lt;/code&gt; WHERE
(&lt;code&gt;people&lt;/code&gt;.&lt;code&gt;name&lt;/code&gt; = BINARY 'andr&amp;eacute;')
LIMIT 1&lt;/p&gt;
&lt;p&gt;while Sqlite gets&lt;/p&gt;
&lt;p&gt;SELECT &quot;people&quot;.id FROM &quot;people&quot; WHERE (&quot;people&quot;.&quot;name&quot; =
'andr&amp;eacute;') LIMIT 1&lt;/p&gt;
&lt;p&gt;Code to reproduce is on &lt;a href=&quot;http://github.com/awendt/validates_uniqueness_with_diacritics.%3C/p&quot;&gt;
http://github.com/awendt/validat...&lt;/a&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;SHOW CREATE TABLE people:&lt;/p&gt;
&lt;p&gt;
+--------+----------------------------------------------------------
| Table | Create Table|
+--------+----------------------------------------------------------
| people | CREATE TABLE &lt;code&gt;people&lt;/code&gt; ( &lt;code&gt;id&lt;/code&gt;
int(11) NOT NULL auto_increment, &lt;code&gt;name&lt;/code&gt; varchar(255)
default NULL, &lt;code&gt;created_at&lt;/code&gt; datetime default NULL,
&lt;code&gt;updated_at&lt;/code&gt; datetime default NULL, PRIMARY KEY
(&lt;code&gt;id&lt;/code&gt;) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT
CHARSET=utf8
+--------+----------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Character set and collation seem fine. This is on OSX.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Consider this Person model on Rails 2.3.2:

  `class Person &lt; ActiveRecord::Base`
  
  `validates_uniqueness_of :name`
  
  `end`

This lets me create two people with the name 'andr&#233;', and the second person gets an ActiveRecord::StatementInvalid. The same code on Sqlite works fine.

This is because the MySQL adapter issues

  SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&#233;') LIMIT 1

while Sqlite gets

  SELECT &quot;people&quot;.id FROM &quot;people&quot; WHERE (&quot;people&quot;.&quot;name&quot; = 'andr&#233;') LIMIT 1

Code to reproduce is on http://github.com/awendt/validates_uniqueness_with_diacritics

SHOW CREATE TABLE people:

CREATE TABLE `people` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) default NULL,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8

Character set and collation seem fine. This is on OSX.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Consider this Person model on Rails 2.3.2:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;class Person &amp;lt; ActiveRecord::Base&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;validates_uniqueness_of :name&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;end&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This lets me create two people with the name 'andr&amp;eacute;', and
the second person gets an ActiveRecord::StatementInvalid. The same
code on Sqlite works fine.&lt;/p&gt;
&lt;p&gt;This is because the MySQL adapter issues&lt;/p&gt;
&lt;p&gt;SELECT &lt;code&gt;people&lt;/code&gt;.id FROM &lt;code&gt;people&lt;/code&gt; WHERE
(&lt;code&gt;people&lt;/code&gt;.&lt;code&gt;name&lt;/code&gt; = BINARY 'andr&amp;eacute;')
LIMIT 1&lt;/p&gt;
&lt;p&gt;while Sqlite gets&lt;/p&gt;
&lt;p&gt;SELECT &quot;people&quot;.id FROM &quot;people&quot; WHERE (&quot;people&quot;.&quot;name&quot; =
'andr&amp;eacute;') LIMIT 1&lt;/p&gt;
&lt;p&gt;Code to reproduce is on &lt;a href=
&quot;http://github.com/awendt/validates_uniqueness_with_diacritics&quot;&gt;http://github.com/awendt/validates_uniqueness_with_diacritics&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;SHOW CREATE TABLE people:&lt;/p&gt;
&lt;p&gt;CREATE TABLE &lt;code&gt;people&lt;/code&gt; (&lt;br&gt;
&lt;code&gt;id&lt;/code&gt; int(11) NOT NULL auto_increment, &lt;code&gt;name&lt;/code&gt;
varchar(255) default NULL, &lt;code&gt;created_at&lt;/code&gt; datetime default
NULL, &lt;code&gt;updated_at&lt;/code&gt; datetime default NULL, PRIMARY KEY
(&lt;code&gt;id&lt;/code&gt;) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT
CHARSET=utf8&lt;/p&gt;
&lt;p&gt;Character set and collation seem fine. This is on OSX.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-08T13:26:48+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>validates_uniqueness_of fails with diacritics on MySQL</title>
      <updated-at type="datetime">2009-07-08T13:29:26+01:00</updated-at>
      <user-id type="integer">38023</user-id>
      <user-name>awendt</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>What do you expect to get if you insert two times the same value and have a uniqueness validation? I don't see any strange behavior.</body>
      <body-html>&lt;div&gt;&lt;p&gt;What do you expect to get if you insert two times the same value
and have a uniqueness validation? I don't see any strange
behavior.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-08T16:35:17+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>validates_uniqueness_of fails with diacritics on MySQL</title>
      <updated-at type="datetime">2009-07-08T16:35:20+01:00</updated-at>
      <user-id type="integer">31975</user-id>
      <user-name>Francesc Esplugas</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Maybe I wasn't quite clear. The strange behavior is that the validation actually passes.

If I already have that value in the DB, I expect to get a validation error, as this is the whole purpose of validates_uniqueness_of.

I don't expect the validation let the value slip through and then realize on inserting that the DB rejects the value (ActiveRecord::StatementInvalid).

Please clone the project and have a look at the tags works_on_sqlite and fails_on_mysql. In Sqlite, all tests pass. In MySQL, they don't.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Maybe I wasn't quite clear. The strange behavior is that the
validation actually passes.&lt;/p&gt;
&lt;p&gt;If I already have that value in the DB, I expect to get a
validation error, as this is the whole purpose of
validates_uniqueness_of.&lt;/p&gt;
&lt;p&gt;I don't expect the validation let the value slip through and
then realize on inserting that the DB rejects the value
(ActiveRecord::StatementInvalid).&lt;/p&gt;
&lt;p&gt;Please clone the project and have a look at the tags
works_on_sqlite and fails_on_mysql. In Sqlite, all tests pass. In
MySQL, they don't.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-09T08:30:32+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>validates_uniqueness_of fails with diacritics on MySQL</title>
      <updated-at type="datetime">2009-07-09T08:30:33+01:00</updated-at>
      <user-id type="integer">38023</user-id>
      <user-name>awendt</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-13T19:32:39+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:title: validates_uniqueness_of fails with diacritics on MySQL
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-07-13T19:32:45+01:00</updated-at>
      <user-id type="integer">38023</user-id>
      <user-name>awendt</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>When using script/console, I can't get the save command to fail; perhaps the problem is with RSpec, and not with ActiveRecord.

@@@
~/proj/avuwd$ script/console
Loading development environment (Rails 2.3.2)
&gt;&gt; Person.find(:all)
=&gt; []
&gt;&gt; p1=Person.new(:name=&gt;'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p1.save
=&gt; true
&gt;&gt; p2=Person.new(:name=&gt;'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p2.save
=&gt; false
&gt;&gt; p2.errors
=&gt; #&lt;ActiveRecord::Errors:0x9b0c404 @base=#&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;, @errors={&quot;name&quot;=&gt;[&quot;has already been taken&quot;]}&gt;
&gt;&gt; Person.find(:all)
=&gt; [#&lt;Person id: 3, name: &quot;Joe&quot;, created_at: &quot;2009-07-13 22:05:55&quot;, updated_at: &quot;2009-07-13 22:05:55&quot;&gt;]
&gt;&gt; p3=Person.new(:name=&gt;'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p3.save
=&gt; true
&gt;&gt; p4=Person.new(:name=&gt;'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p4.save
=&gt; false
&gt;&gt; p4.errors
=&gt; #&lt;ActiveRecord::Errors:0x97cb664 @base=#&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;, @errors={&quot;name&quot;=&gt;[&quot;has already been taken&quot;]}&gt;
&gt;&gt; Person.find(:all)
=&gt; [#&lt;Person id: 3, name: &quot;Joe&quot;, created_at: &quot;2009-07-13 22:05:55&quot;, updated_at: &quot;2009-07-13 22:05:55&quot;&gt;, #&lt;Person id: 4, name: &quot;andr\xC3\xA9&quot;, created_at: &quot;2009-07-13 22:07:41&quot;, updated_at: &quot;2009-07-13 22:07:41&quot;&gt;]
&gt;&gt; 
@@@</body>
      <body-html>&lt;div&gt;&lt;p&gt;When using script/console, I can't get the save command to fail;
perhaps the problem is with RSpec, and not with ActiveRecord.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;~/proj/avuwd$ script/console
Loading development environment (Rails 2.3.2)
&amp;gt;&amp;gt; Person.find(:all)
=&amp;gt; []
&amp;gt;&amp;gt; p1=Person.new(:name=&amp;gt;'Joe')
=&amp;gt; #&amp;lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&amp;gt;
&amp;gt;&amp;gt; p1.save
=&amp;gt; true
&amp;gt;&amp;gt; p2=Person.new(:name=&amp;gt;'Joe')
=&amp;gt; #&amp;lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&amp;gt;
&amp;gt;&amp;gt; p2.save
=&amp;gt; false
&amp;gt;&amp;gt; p2.errors
=&amp;gt; #&amp;lt;ActiveRecord::Errors:0x9b0c404 @base=#&amp;lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&amp;gt;, @errors={&quot;name&quot;=&amp;gt;[&quot;has already been taken&quot;]}&amp;gt;
&amp;gt;&amp;gt; Person.find(:all)
=&amp;gt; [#&amp;lt;Person id: 3, name: &quot;Joe&quot;, created_at: &quot;2009-07-13 22:05:55&quot;, updated_at: &quot;2009-07-13 22:05:55&quot;&amp;gt;]
&amp;gt;&amp;gt; p3=Person.new(:name=&amp;gt;'andr&amp;eacute;')
=&amp;gt; #&amp;lt;Person id: nil, name: &quot;andr&amp;eacute;&quot;, created_at: nil, updated_at: nil&amp;gt;
&amp;gt;&amp;gt; p3.save
=&amp;gt; true
&amp;gt;&amp;gt; p4=Person.new(:name=&amp;gt;'andr&amp;eacute;')
=&amp;gt; #&amp;lt;Person id: nil, name: &quot;andr&amp;eacute;&quot;, created_at: nil, updated_at: nil&amp;gt;
&amp;gt;&amp;gt; p4.save
=&amp;gt; false
&amp;gt;&amp;gt; p4.errors
=&amp;gt; #&amp;lt;ActiveRecord::Errors:0x97cb664 @base=#&amp;lt;Person id: nil, name: &quot;andr&amp;eacute;&quot;, created_at: nil, updated_at: nil&amp;gt;, @errors={&quot;name&quot;=&amp;gt;[&quot;has already been taken&quot;]}&amp;gt;
&amp;gt;&amp;gt; Person.find(:all)
=&amp;gt; [#&amp;lt;Person id: 3, name: &quot;Joe&quot;, created_at: &quot;2009-07-13 22:05:55&quot;, updated_at: &quot;2009-07-13 22:05:55&quot;&amp;gt;, #&amp;lt;Person id: 4, name: &quot;andr\xC3\xA9&quot;, created_at: &quot;2009-07-13 22:07:41&quot;, updated_at: &quot;2009-07-13 22:07:41&quot;&amp;gt;]
&amp;gt;&amp;gt;&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-13T23:15:29+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-07-13T23:15:33+01:00</updated-at>
      <user-id type="integer">53327</user-id>
      <user-name>Kirk</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This is weird, to say the least:

&lt;pre&gt;&lt;code&gt;
$ sc
Loading development environment (Rails 2.3.2)
&gt;&gt; Person.find(:all)
=&gt; []
&gt;&gt; p1=Person.new(:name=&gt;'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p1.save
=&gt; true
&gt;&gt; p2=Person.new(:name=&gt;'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p2.save
=&gt; false
&gt;&gt; p2.errors
=&gt; #&lt;ActiveRecord::Errors:0xb7553900 @errors={&quot;name&quot;=&gt;[&quot;has already been taken&quot;]}, @base=#&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;&gt;
&gt;&gt; Person.find(:all)
=&gt; [#&lt;Person id: 3, name: &quot;Joe&quot;, created_at: &quot;2009-07-17 20:14:52&quot;, updated_at: &quot;2009-07-17 20:14:52&quot;&gt;]
&gt;&gt; p3=Person.new(:name=&gt;'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p3.save
=&gt; true
&gt;&gt; p4=Person.new(:name=&gt;'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p4.save
=&gt; true
&lt;/code&gt;&lt;/pre&gt;

This is on another system. Both run Rails 2.3.2, one with rspec 1.2.4, the other with 1.2.7. Are you on MySQL and not SQLite? And do you get any records when issuing the following?:

&lt;pre&gt;&lt;code&gt;mysql&gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&#233;') LIMIT 1;&lt;/pre&gt;&lt;/code&gt;

I get no records because of the BINARY operator. This is what Rails issues when validating uniqueness. I *do* get a record with

&lt;pre&gt;&lt;code&gt;mysql&gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = 'andr&#233;') LIMIT 1;&lt;/pre&gt;&lt;/code&gt;

So it's no wonder the validation doesn't work as expected...</body>
      <body-html>&lt;div&gt;&lt;p&gt;This is weird, to say the least:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ sc
Loading development environment (Rails 2.3.2)
&amp;gt;&amp;gt; Person.find(:all)
=&amp;gt; []
&amp;gt;&amp;gt; p1=Person.new(:name=&amp;gt;'Joe')
=&amp;gt; #
&amp;gt;&amp;gt; p1.save
=&amp;gt; true
&amp;gt;&amp;gt; p2=Person.new(:name=&amp;gt;'Joe')
=&amp;gt; #
&amp;gt;&amp;gt; p2.save
=&amp;gt; false
&amp;gt;&amp;gt; p2.errors
=&amp;gt; #[&quot;has already been taken&quot;]}, @base=#&amp;gt;
&amp;gt;&amp;gt; Person.find(:all)
=&amp;gt; [#]
&amp;gt;&amp;gt; p3=Person.new(:name=&amp;gt;'andr&amp;eacute;')
=&amp;gt; #
&amp;gt;&amp;gt; p3.save
=&amp;gt; true
&amp;gt;&amp;gt; p4=Person.new(:name=&amp;gt;'andr&amp;eacute;')
=&amp;gt; #
&amp;gt;&amp;gt; p4.save
=&amp;gt; true&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This is on another system. Both run Rails 2.3.2, one with rspec
1.2.4, the other with 1.2.7. Are you on MySQL and not SQLite? And
do you get any records when issuing the following?:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;mysql&amp;gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&amp;eacute;') LIMIT 1;&lt;/code&gt;
&lt;/pre&gt;
I get no records because of the BINARY operator. This is what Rails
issues when validating uniqueness. I *do* get a record with
&lt;pre&gt;
&lt;code&gt;mysql&amp;gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = 'andr&amp;eacute;') LIMIT 1;&lt;/code&gt;
&lt;/pre&gt;
So it's no wonder the validation doesn't work as expected...&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-17T21:24:28+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-07-17T21:24:30+01:00</updated-at>
      <user-id type="integer">38023</user-id>
      <user-name>awendt</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I have this issue too with Rail 2.3.3 and MySQL.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I have this issue too with Rail 2.3.3 and MySQL.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-30T22:36:03+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-07-30T22:36:05+01:00</updated-at>
      <user-id type="integer">64587</user-id>
      <user-name>Emmanuel</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-02T11:14:12+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2-3-stable activerecord adapters mysql validate_uniqueness_of
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-02T11:14:15+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>As Kirk said, I can't reproduce the errors on Rails 2.3.2 and Rails 2.3.3 too.

&lt;code&gt;
&gt;&gt; Person.all
=&gt; []
&gt;&gt; p1 = Person.new(:name =&gt; 'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p1.save
=&gt; true
&gt;&gt; p2 = Person.new(:name =&gt; 'Joe')
=&gt; #&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p2.save
=&gt; false
&gt;&gt; p2.errors
=&gt; #&lt;ActiveRecord::Errors:0x27983d8 @base=#&lt;Person id: nil, name: &quot;Joe&quot;, created_at: nil, updated_at: nil&gt;, @errors={&quot;name&quot;=&gt;[&quot;has already been taken&quot;]}&gt;
&gt;&gt; p3 = Person.new(:name =&gt; 'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p3.save
=&gt; true
&gt;&gt; p4 = Person.new(:name =&gt; 'andr&#233;')
=&gt; #&lt;Person id: nil, name: &quot;andr&#233;&quot;, created_at: nil, updated_at: nil&gt;
&gt;&gt; p4.save
=&gt; false
&lt;/code&gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;As Kirk said, I can't reproduce the errors on Rails 2.3.2 and
Rails 2.3.3 too.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Person.all =&amp;gt; [] p1 = Person.new(:name =&amp;gt; 'Joe') =&amp;gt; #
p1.save =&amp;gt; true p2 = Person.new(:name =&amp;gt; 'Joe') =&amp;gt; #
p2.save =&amp;gt; false p2.errors =&amp;gt;
#&amp;lt;ActiveRecord::Errors:0x27983d8 @base=#,
@errors={&quot;name&quot;=&amp;gt;[&quot;has already been taken&quot;]}&amp;gt; p3 =
Person.new(:name =&amp;gt; 'andr&amp;eacute;') =&amp;gt; # p3.save =&amp;gt; true
p4 = Person.new(:name =&amp;gt; 'andr&amp;eacute;') =&amp;gt; # p4.save =&amp;gt;
false&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-08T17:41:42+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-08T17:41:47+01:00</updated-at>
      <user-id type="integer">20230</user-id>
      <user-name>Leandro Heuert</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Leandro, neither you nor Kirk have responded how many records you get with these two statements:

&lt;code&gt;
mysql&gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = BINARY 'andr&#233;') LIMIT 1;
mysql&gt; SELECT `people`.id FROM `people` WHERE (`people`.`name` = 'andr&#233;') LIMIT 1;
&lt;/code&gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Leandro, neither you nor Kirk have responded how many records
you get with these two statements:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br&gt;
mysql&amp;gt; SELECT&lt;/code&gt; people.id FROM &lt;code&gt;people&lt;/code&gt; WHERE
(&lt;code&gt;people&lt;/code&gt;.&lt;code&gt;name&lt;/code&gt; = BINARY 'andr&amp;eacute;')
LIMIT 1;&lt;br&gt;
mysql&amp;gt; SELECT &lt;code&gt;people&lt;/code&gt;.id FROM &lt;code&gt;people&lt;/code&gt;
WHERE (&lt;code&gt;people&lt;/code&gt;.&lt;code&gt;name&lt;/code&gt; = 'andr&amp;eacute;')
LIMIT 1;&lt;br&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-08T18:55:10+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-08T18:55:15+01:00</updated-at>
      <user-id type="integer">38023</user-id>
      <user-name>awendt</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I verified that this issue occurs in 2-3-stable. I've attached a test that currently fails when I run:

rake test_mysql TEST=test/cases/validations_test.rb

on the activerecord folder.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I verified that this issue occurs in 2-3-stable. I've attached a
test that currently fails when I run:&lt;/p&gt;
&lt;p&gt;rake test_mysql TEST=test/cases/validations_test.rb&lt;/p&gt;
&lt;p&gt;on the activerecord folder.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-08T22:30:52+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-08T22:30:54+01:00</updated-at>
      <user-id type="integer">30376</user-id>
      <user-name>Hugo Peixoto</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Thanks Hugo!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks Hugo!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-08T23:41:53+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
:milestone: 9903
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-08T23:41:59+01:00</updated-at>
      <user-id type="integer">85</user-id>
      <user-name>Jeremy Kemper</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Note that a fix is still needed :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Note that a fix is still needed :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-09T01:30:28+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T01:30:29+01:00</updated-at>
      <user-id type="integer">85</user-id>
      <user-name>Jeremy Kemper</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>verified

+1 This issue is present in 2-3-stable. 

Will be submitting a test case for master now.</body>
      <body-html>&lt;div&gt;&lt;p&gt;verified&lt;/p&gt;
&lt;p&gt;+1 This issue is present in 2-3-stable.&lt;/p&gt;
&lt;p&gt;Will be submitting a test case for master now.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-09T01:44:54+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2-3-stable activerecord adapters bugmash mysql validate_uniqueness_of
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T01:44:56+01:00</updated-at>
      <user-id type="integer">65556</user-id>
      <user-name>Rizwan Reza</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>verified patch

+1 this issue is also present in master.

The attached test case is for master.</body>
      <body-html>&lt;div&gt;&lt;p&gt;verified patch&lt;/p&gt;
&lt;p&gt;+1 this issue is also present in master.&lt;/p&gt;
&lt;p&gt;The attached test case is for master.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-09T02:01:17+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T02:01:23+01:00</updated-at>
      <user-id type="integer">65556</user-id>
      <user-name>Rizwan Reza</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>OK, I found the problem. But I need to be advised on how to proceed.

The &quot;&#233;&quot; characters on the test case I provided (provode? :p) are in UTF-8.
The databases are created using the default charset, which is latin1_swedish_ci.
This somehow causes the comparisons to fail.

I created the test databases with the following commands:

@@@
create database activerecord_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
create database activerecord_unittest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
@@@

and ran the tests. It worked. So, should I change the database creation call on the Rakefile?</body>
      <body-html>&lt;div&gt;&lt;p&gt;OK, I found the problem. But I need to be advised on how to
proceed.&lt;/p&gt;
&lt;p&gt;The &quot;&amp;eacute;&quot; characters on the test case I provided (provode?
:p) are in UTF-8.&lt;br&gt;
The databases are created using the default charset, which is
latin1_swedish_ci.&lt;br&gt;
This somehow causes the comparisons to fail.&lt;/p&gt;
&lt;p&gt;I created the test databases with the following commands:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;create database activerecord_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
create database activerecord_unittest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and ran the tests. It worked. So, should I change the database
creation call on the Rakefile?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-09T02:25:46+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T02:25:49+01:00</updated-at>
      <user-id type="integer">30376</user-id>
      <user-name>Hugo Peixoto</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>OK, I did what I mentioned in the previous comment. I've attached a patch.</body>
      <body-html>&lt;div&gt;&lt;p&gt;OK, I did what I mentioned in the previous comment. I've
attached a patch.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-08-09T02:53:52+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>verified</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T02:53:55+01:00</updated-at>
      <user-id type="integer">30376</user-id>
      <user-name>Hugo Peixoto</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>2-3-stable: ac9f9a9c3e61e977a1614f484648d9334d0f67ed

master: ac9f9a9c3e61e977a1614f484648d9334d0f67ed</body>
      <body-html>&lt;div&gt;&lt;p&gt;2-3-stable: ac9f9a9c3e61e977a1614f484648d9334d0f67ed&lt;/p&gt;
&lt;p&gt;master: ac9f9a9c3e61e977a1614f484648d9334d0f67ed&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T03:11:24+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:state: verified
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T03:11:27+01:00</updated-at>
      <user-id type="integer">85</user-id>
      <user-name>Jeremy Kemper</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T03:11:30+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T03:11:33+01:00</updated-at>
      <user-id type="integer">85</user-id>
      <user-name>Jeremy Kemper</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>+1 support for the patch, however.... it depends on the encoding of your database. All new databases are created with utf-8 on my machine (as defined in my /opt/local/etc/mysql5/my.cnf file) and as such, the test in this ticket did not cause failures when running the mysql activerecord test suite.

    % cat /opt/local/etc/mysql5/my.cnf
    [client]
    default-character-set=utf8
    [mysqld]
    init-connect = SET NAMES utf8
    character-set-server = utf8


    mysql&gt; SHOW VARIABLES LIKE 'character_set%';
    +--------------------------+-----------------------------------------+
    | Variable_name            | Value                                   |
    +--------------------------+-----------------------------------------+
    | character_set_client     | utf8                                    | 
    | character_set_connection | utf8                                    | 
    | character_set_database   | utf8                                    | 
    | character_set_filesystem | binary                                  | 
    | character_set_results    | utf8                                    | 
    | character_set_server     | utf8                                    | 
    | character_set_system     | utf8                                    | 
    | character_sets_dir       | /opt/local/share/mysql5/mysql/charsets/ | 
    +--------------------------+-----------------------------------------+
    8 rows in set (0.00 sec)

That said, the patch to fix this did not affect already working system, so to avoid inconsistencies like this, it would be good to force a database type to utf8 (anyone working with translations in a database probably already does this).</body>
      <body-html>&lt;div&gt;&lt;p&gt;+1 support for the patch, however.... it depends on the encoding
of your database. All new databases are created with utf-8 on my
machine (as defined in my /opt/local/etc/mysql5/my.cnf file) and as
such, the test in this ticket did not cause failures when running
the mysql activerecord test suite.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;% cat /opt/local/etc/mysql5/my.cnf
[client]
default-character-set=utf8
[mysqld]
init-connect = SET NAMES utf8
character-set-server = utf8


mysql&amp;gt; SHOW VARIABLES LIKE 'character_set%';
+--------------------------+-----------------------------------------+
| Variable_name            | Value                                   |
+--------------------------+-----------------------------------------+
| character_set_client     | utf8                                    | 
| character_set_connection | utf8                                    | 
| character_set_database   | utf8                                    | 
| character_set_filesystem | binary                                  | 
| character_set_results    | utf8                                    | 
| character_set_server     | utf8                                    | 
| character_set_system     | utf8                                    | 
| character_sets_dir       | /opt/local/share/mysql5/mysql/charsets/ | 
+--------------------------+-----------------------------------------+
8 rows in set (0.00 sec)&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That said, the patch to fix this did not affect already working
system, so to avoid inconsistencies like this, it would be good to
force a database type to utf8 (anyone working with translations in
a database probably already does this).&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T04:12:24+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified
:assigned_user: 85
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T04:12:27+01:00</updated-at>
      <user-id type="integer">26790</user-id>
      <user-name>Kieran P</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>(that my.cnf file was misformatted, see http://pastie.org/577142)</body>
      <body-html>&lt;div&gt;&lt;p&gt;(that my.cnf file was misformatted, see &lt;a href=
&quot;http://pastie.org/577142&quot;&gt;http://pastie.org/577142&lt;/a&gt;)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T04:15:50+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T04:15:52+01:00</updated-at>
      <user-id type="integer">26790</user-id>
      <user-name>Kieran P</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>Sorry about that. Started the message over an hour ago and had to go afk. Nice to see it was committed.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sorry about that. Started the message over an hour ago and had
to go afk. Nice to see it was committed.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T04:17:32+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2-3-stable 3.0 activerecord adapters bugmash mysql validate_uniqueness_of verified
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T04:17:37+01:00</updated-at>
      <user-id type="integer">26790</user-id>
      <user-name>Kieran P</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>(from [ac9f9a9c3e61e977a1614f484648d9334d0f67ed]) MySQL: fix diacritic uniqueness test by setting the default character set and collation to utf8/utf8_unicode_ci

[#2883 state:committed]

Signed-off-by: Jeremy Kemper &lt;jeremy@bitsweat.net&gt;
http://github.com/rails/rails/commit/ac9f9a9c3e61e977a1614f484648d9334d0f67ed</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/ac9f9a9c3e61e977a1614f484648d9334d0f67ed&quot;
title=
&quot;Changeset [ac9f9a9c3e61e977a1614f484648d9334d0f67ed]&quot;&gt;[ac9f9a9c3e61e977a1614f484648d9334d0f67ed]&lt;/a&gt;)
MySQL: fix diacritic uniqueness test by setting the default
character set and collation to utf8/utf8_unicode_ci&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;/projects/8994/tickets/2883&quot; title=
&quot;Ticket #2883&quot;&gt;#2883&lt;/a&gt; state:committed]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Jeremy Kemper &lt;a&gt;jeremy@bitsweat.net&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/ac9f9a9c3e61e977a1614f484648d9334d0f67ed&quot;&gt;
http://github.com/rails/rails/commit/ac9f9a9c3e61e977a1614f484648d9...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T05:31:14+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T05:31:16+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>(from [d8041538dd1fed038c1ad30ddca5c9ce8254ee30]) MySQL: fix diacritic uniqueness test by setting the default character set and collation to utf8/utf8_unicode_ci

[#2883 state:committed]

Signed-off-by: Jeremy Kemper &lt;jeremy@bitsweat.net&gt;
http://github.com/rails/rails/commit/d8041538dd1fed038c1ad30ddca5c9ce8254ee30</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/d8041538dd1fed038c1ad30ddca5c9ce8254ee30&quot;
title=
&quot;Changeset [d8041538dd1fed038c1ad30ddca5c9ce8254ee30]&quot;&gt;[d8041538dd1fed038c1ad30ddca5c9ce8254ee30]&lt;/a&gt;)
MySQL: fix diacritic uniqueness test by setting the default
character set and collation to utf8/utf8_unicode_ci&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;/projects/8994/tickets/2883&quot; title=
&quot;Ticket #2883&quot;&gt;#2883&lt;/a&gt; state:committed]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Jeremy Kemper &lt;a&gt;jeremy@bitsweat.net&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/d8041538dd1fed038c1ad30ddca5c9ce8254ee30&quot;&gt;
http://github.com/rails/rails/commit/d8041538dd1fed038c1ad30ddca5c9...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T05:31:14+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T05:31:15+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>(from [a8286af3c335eeb80245db2ffbcfc6c06fb6fc60]) Added a uniqueness validation test that uses diacritics.

[#2883 state:committed]

Signed-off-by: Jeremy Kemper &lt;jeremy@bitsweat.net&gt;
http://github.com/rails/rails/commit/a8286af3c335eeb80245db2ffbcfc6c06fb6fc60</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/a8286af3c335eeb80245db2ffbcfc6c06fb6fc60&quot;
title=
&quot;Changeset [a8286af3c335eeb80245db2ffbcfc6c06fb6fc60]&quot;&gt;[a8286af3c335eeb80245db2ffbcfc6c06fb6fc60]&lt;/a&gt;)
Added a uniqueness validation test that uses diacritics.&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;/projects/8994/tickets/2883&quot; title=
&quot;Ticket #2883&quot;&gt;#2883&lt;/a&gt; state:committed]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Jeremy Kemper &lt;a href=
&quot;mailto:jeremy@bitsweat.net&quot;&gt;jeremy@bitsweat.net&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/a8286af3c335eeb80245db2ffbcfc6c06fb6fc60&quot;&gt;
http://github.com/rails/rails/commit/a8286af3c335eeb80245db2ffbcfc6...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T19:56:41+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T19:56:42+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">3</attachments-count>
      <body>(from [ff60ec469fd85db450c9c2c7eb8f9d9254e45988]) Added a uniqueness validation test that uses diacritics.

[#2883 state:committed]

Signed-off-by: Jeremy Kemper &lt;jeremy@bitsweat.net&gt;
http://github.com/rails/rails/commit/ff60ec469fd85db450c9c2c7eb8f9d9254e45988</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/ff60ec469fd85db450c9c2c7eb8f9d9254e45988&quot;
title=
&quot;Changeset [ff60ec469fd85db450c9c2c7eb8f9d9254e45988]&quot;&gt;[ff60ec469fd85db450c9c2c7eb8f9d9254e45988]&lt;/a&gt;)
Added a uniqueness validation test that uses diacritics.&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;/projects/8994/tickets/2883&quot; title=
&quot;Ticket #2883&quot;&gt;#2883&lt;/a&gt; state:committed]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Jeremy Kemper &lt;a href=
&quot;mailto:jeremy@bitsweat.net&quot;&gt;jeremy@bitsweat.net&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/ff60ec469fd85db450c9c2c7eb8f9d9254e45988&quot;&gt;
http://github.com/rails/rails/commit/ff60ec469fd85db450c9c2c7eb8f9d...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-09T19:56:42+01:00</created-at>
      <creator-id type="integer">38023</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">41987</milestone-id>
      <number type="integer">2883</number>
      <permalink>validates_uniqueness_of-fails-with-diacritics-on-mysql</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 activerecord adapters mysql validate_uniqueness_of verified</tag>
      <title>Diacritics break validates_uniqueness_of on MySQL</title>
      <updated-at type="datetime">2009-08-09T19:56:43+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>awendt</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2883</url>
      <milestone-title>2.3.4</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>f8ca7d375284b9fe24a01a7abdd7f8fc7b22ff4e</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-08-08T22:30:52+01:00</created-at>
      <filename>validates_uniqueness_with_diacritics.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">239183</id>
      <size type="integer">2117</size>
      <uploader-id type="integer">30376</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/239183/validates_uniqueness_with_diacritics.diff</url>
    </attachment>
    <attachment type="Attachment">
      <code>1e20855f90a4acf778267ee758a8f0f059426568</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-08-09T02:01:17+01:00</created-at>
      <filename>test-diacritics-fail.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">239229</id>
      <size type="integer">1308</size>
      <uploader-id type="integer">65556</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/239229/test-diacritics-fail.diff</url>
    </attachment>
    <attachment type="Attachment">
      <code>2265919762e7410b243ac5d32be6c9105220c614</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-08-09T02:53:52+01:00</created-at>
      <filename>2883-default-activerecord-validations-charset-and-collation.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">239233</id>
      <size type="integer">1249</size>
      <uploader-id type="integer">30376</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/239233/2883-default-activerecord-validations-charset-and-collation.diff</url>
    </attachment>
  </attachments>
</ticket>
