Hello,

I am using rails 2.1 and mysql with utf8

>> Character.all(:conditions => { :name => 'à' })
=> [#<Character id: 2, name: "a">, #<Character id: 56, name: "à">]
>> Character.all(:conditions => { :name => 'à' }).last.name
=> "à"
>> Character.all(:conditions => { :name => 'à' }).last.name == 'a'
=> false
>> Character.all(:conditions => { :name => 'à' }).last.name == 'à'
=> true

I use uniqueness validation on the name column and it correctly does not
complain that a is the same as à. Also ruby-internally the two strings/chars
are different.
but when I do retrieval they are conflated and considered identical? see
above and also:

Character.find_all_by_name('a')
=> [#<Character id: 2, name: "a">, #<Character id: 56, name: "à">]
>> Character.find_all_by_name('à')
=> [#<Character id: 2, name: "a">, #<Character id: 56, name: "à">]

Also, using find_or_create_by_name works incorrectly.
What am i doing wrong? Is this a bug somewhere?

Thanks for help

Vik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to