On 17 Oct 2009, at 04:43, sebastien barre wrote: > DataMapper.setup(:default, 'mysql://user:p...@localhost/dbname') > > Adding :encoding as a third parameter throws an error.
As you can see from the connection string here, DataObjects uses URI's to define a connection. Therefore the encoding is also a parameter for this uri, so you can specify it like this: DataMapper.setup(:default, 'mysql://user:p...@localhost/dbname? encoding=ISO-8859-1') For a list of supported encoding, please look at: http://github.com/datamapper/do/blob/master/do_mysql/lib/do_mysql/encoding.rb The names you should use in the uri are Ruby's names for the encoding, not the MySQL name! DataObjects tries to abstract the database connectivity where possible, so hence the choice for using Ruby's name and not the name of each different RDBMS. -- Regards, Dirkjan Bussink --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
