Ensure your database.yml file has a line like: encoding: utf8
On May 26, 10:50 am, "Jeffrey L. Taylor" <r...@abluz.dyndns.org> wrote: > I am switching to a composite primary key (string and user ID) from the Rails > conventional auto-incrementing integer primary ID. The table is large (2.5 > million records) and I'd rather not discard the contents. The > composite_primary_key gem doesn't appear to support altering the table with a > migration to do its magic, only creating a table from scratch. So I dumped > the table with mysqldump, ran the migration (table looks good), and am trying > to repopulate the table. It has accented characters and is complaining about > duplicates, apparently around words with and without accents, e.g., 'jose' and > 'josé'. I've been deleting one by hand from the dump, but it is tedious and > very slow. Emacs crawls when dealing with very large files with very long > lines. > > I just don't understand why the accents are causing problems. The string > column is utf8_general_ci collation, just like other fields in the database > with strings with accents. What do I need to specify so it will import the > dump? Is there a problem with strings with accents in composite indexes? > > The table is created with a Rails migration, but everything else is pure MySQL > utilities. > > TIA, > Jeffrey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---