Thanks, it's really weird, because UTF8 is what MySQL uses in table definitions 
etc:

CREATE TABLE foo (
 ...
) ENGINE=InnoDB CHARSET=utf8;

Changing to utf-8, or UTF-8 (with or without quotes) produces a crash in 
ActiveRecord instead of a warning from DO:

Character set 'utf-8' is not a compiled character set and is not specified in 
the '/usr/share/mysql/charsets/Index.xml' file
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/connection_adapters/mysql_adapter.rb:614:in
 `real_connect': Can't initialize character set utf-8 (path: 
/usr/share/mysql/charsets/) (Mysql::Error)

Using UTF8 (without the hypen, in uppercase) produces the warning, but Rails 
starts successfully.

With regards to DataObjects vs. DataMapper, excuse my ignorance, but are they 
not all part of the same group of projects?  They all come under the 
data-mapper github account and seem to have the same contributors.


El 06/05/2011, a las 16:06, Dan Kubb (dkubb) escribió:

> Chris,
> 
>> In my logs I've been getting this since I started using DataMapper.  I don't 
>> know if it's something I should be concerned about or not.
>> 
>> /usr/local/rvm/gems/ruby-1.9.2-p180/gems/data_objects-0.10.5/lib/data_objec 
>> ts/connection.rb:79: warning: Encoding UTF8 is not a known Ruby encoding for 
>> MySQL
>> 
>> Is this a regression with DM 1.1, or has this always happened?
> 
> It doesn't have anything to do with DataMapper specifically. Note the
> warning is coming from DataObjects, which is the database driver that
> the DataMapper RDBMS adapters use. A new 0.10.5 was recently released,
> so it's possible it's gotten a bit more strict in the string it
> expects or perhaps it logs now where previously it did nothing.
> 
>>   encoding: utf8
> 
> What happens if you try "utf-8" or "UTF-8" ?
> 
> --
> 
> Dan
> (dkubb)
> 
> -- 
> 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.
> 

-- 
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.

Reply via email to