Dear sqlobject-discuss,

i have a big problem, because i have to insert unicode into mysql
tables
mysql version is 1.4.13

i have already mysql-python version 1.2.2b1
it handle unicode inserting well, for instance this code works fine:
sb = u'éáí'.encode('utf-8')
c.execute("insert into unit (code) values ('%s')" % sb)

but when i try to insert the same thing with SQLObject the system
inserts something different to the table:

this is my py code
connString = "mysql://root:[EMAIL PROTECTED]/vss_history?use_unicode=1&debug=1"
__connection__ = connectionForURI(connString)

class Unit(SQLObject):
    class sqlmeta:
        fromDatabase=True

Unit(code=u'éáí')

this is the mysql table create command
DROP TABLE IF EXISTS `vss_history`.`unit`;
CREATE TABLE  `vss_history`.`unit` (
  `id` int(11) NOT NULL auto_increment,
  `code` varchar(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  

please help me, because i've already spent too many time with many,
many trials without success

-- 
Best regards,
 Ivan Horvath
 Chief Programmer

Anyone who has never made a mistake has never tried anything new.

/Albert Einstein/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to