>       For example MySQL's Unicode documentation is here
>
> Also note that you need to consider both the encoding of the database
> and the encoding used by the database driver.
>
> If you're using MySQL together with SQLAlchemy, see the following, as
> there are some bugs in MySQLdb that you'll need to work around:
>
> http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00366.html

Shannon, I've read the therad on the sqlalchemy list.. but I never saw
the output of 'show create table ...'.
This is very important because different versions of MySQL might have
different defaults, and your Linux distro might also set it's own
defaults.

The thing is that a conversion can happen in the MySQL C API and in the
MySQL DB too.
I've been using this code to connect to MySQL
db = MySQLdb.connect(db='test', charset='utf8', use_unicode=True)

which, as I understand it, tells the MySQL C API to use UTF-8 over the
wire (charset='utf8'), and to use unicode objects on the Python side of
the things (use_unicode=True). But also my unicode test table is
created like this:
CREATE TABLE `test_unicode_table` (
  `id` int(11) NOT NULL auto_increment,
  `test_column` varchar(5) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to