Re: [web2py] Setting mysql collation in web2py?

2012-01-25 Thread mdorval
I've tracked down this problem to this code in DAL create_table: if self.dbengine == 'mysql': if not hasattr(table, _primarykey): fields.append('PRIMARY KEY(%s)' % table._id.name) other = ' ENGINE=InnoDB CHARACTER SET utf8;' hard coding the

Re: [web2py] Setting mysql collation in web2py?

2012-01-25 Thread Bruno Rocha
Maybe it should be a parameter with defaults to utf8 On Wed, Jan 25, 2012 at 8:03 PM, mdorval rockingdor...@gmail.com wrote: I've tracked down this problem to this code in DAL create_table: if self.dbengine == 'mysql': if not hasattr(table, _primarykey):

[web2py] Setting mysql collation in web2py?

2012-01-19 Thread mdorval
Hey, I was wondering if there's any way to set the collation of the mysql tables created by web2py to utf8_bin. Thanks!

Re: [web2py] Setting mysql collation in web2py?

2012-01-19 Thread Bruno Rocha
may be this argument db = DAL(mysql://, * db_codec*='UTF-8') On Thu, Jan 19, 2012 at 6:47 PM, mdorval rockingdor...@gmail.com wrote: Hey, I was wondering if there's any way to set the collation of the mysql tables created by web2py to utf8_bin. Thanks! -- Bruno Rocha

Re: [web2py] Setting mysql collation in web2py?

2012-01-19 Thread Bruno Rocha
BTW, DAL receives another argument driver_args = None You can pass args to the mysql driver

Re: [web2py] Setting mysql collation in web2py?

2012-01-19 Thread mdorval
Thanks for the note! I've tried passing to the driver_args a Charset object (defined by the pymysql lib like so): from gluon.contrib.pymysql import charset passing into DAL DAL(,driver_args={'charset':charset.charset_by_id(83)) in the charset module this is the Charset object I'm referring