Author: btami Date: 2008-03-17 06:04:56 -0500 (Mon, 17 Mar 2008) New Revision: 9856
Modified: trunk/gnue-common/src/datasources/drivers/sql/interbase/Behavior.py trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py Log: UTF8 and LOWER changes in firebird Modified: trunk/gnue-common/src/datasources/drivers/sql/interbase/Behavior.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/interbase/Behavior.py 2008-03-12 11:35:59 UTC (rev 9855) +++ trunk/gnue-common/src/datasources/drivers/sql/interbase/Behavior.py 2008-03-17 11:04:56 UTC (rev 9856) @@ -128,7 +128,7 @@ self.__connection._driver.create_database (\ u"create database '%s' user '%s' password '%s' " \ - "default character set UNICODE_FSS" % (dburl, username, password)) + "default character set UTF8" % (dburl, username, password)) self.__connection.manager.loginToConnection (self.__connection) @@ -136,10 +136,14 @@ "CHECK (value IN (0,1) OR value IS NULL);" self.__connection.makecursor (code) - code = u"DECLARE EXTERNAL FUNCTION lower CSTRING(255) " \ - "RETURNS CSTRING(255) FREE_IT " \ - "ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';" - self.__connection.makecursor (code) + # LOWER is a reserved word since Firebird 2.0 + ver = self.__connection._native.server_version + if (not 'Firebird' in ver) or ver[ver.find('Firebird')+9] == '1': + code = u"DECLARE EXTERNAL FUNCTION lower CSTRING(255) " \ + "RETURNS CSTRING(255) FREE_IT " \ + "ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';" + self.__connection.makecursor (code) + self.__connection.commit () # --------------------------------------------------------------------------- Modified: trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py 2008-03-12 11:35:59 UTC (rev 9855) +++ trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py 2008-03-17 11:04:56 UTC (rev 9856) @@ -243,7 +243,7 @@ '' : 'NONE', '' : 'OCTETS', '' : 'SJIS_0208', - 'utf-8' : 'UNICODE_FSS', + 'utf-8' : 'UTF8', 'cp1250' : 'WIN1250', 'cp1251' : 'WIN1251', 'cp1252' : 'WIN1252', _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue