Adding ;charset=utf8 to connection DSN didnt work for MySQL. Non-UTF8 attribute values on models silently breaks to_json() func which will return NULL for non-utf8 values.
There really should be a way to specify additional PDO options, or alternatively support character sets both for connection and models values. Dang.
Peter
Clay vanSchalkwijkWed Sep 14 00:14:19 -0400 2011
You can pass in the character set in the connection string of the config, e.g. mysql://user:pass@localhost/db?charset=utf8. This is patched and in the ar/master branch (nightly build).
Subject: PDO options
There seems to be no support for specifying custom PDO connection options, I had to hack Connection.php:
Adding ;charset=utf8 to connection DSN didnt work for MySQL. Non-UTF8 attribute values on models silently breaks to_json() func which will return NULL for non-utf8 values.
There really should be a way to specify additional PDO options, or alternatively support character sets both for connection and models values. Dang.
Peter