[Zope-Checkins] SVN: Zope/trunk/lib/python/Shared/DC/ZRDB/sqltest.py Handle unicode strings.

Florent Guillaume fg at nuxeo.com
Fri Nov 26 11:33:03 EST 2004


Log message for revision 28517:
  Handle unicode strings.
  

Changed:
  U   Zope/trunk/lib/python/Shared/DC/ZRDB/sqltest.py

-=-
Modified: Zope/trunk/lib/python/Shared/DC/ZRDB/sqltest.py
===================================================================
--- Zope/trunk/lib/python/Shared/DC/ZRDB/sqltest.py	2004-11-26 16:30:02 UTC (rev 28516)
+++ Zope/trunk/lib/python/Shared/DC/ZRDB/sqltest.py	2004-11-26 16:33:03 UTC (rev 28517)
@@ -160,7 +160,8 @@
                         'Invalid floating-point value for <em>%s</em>' % name)
 
             else:
-                v=str(v)
+                if not isinstance(v, (str, unicode)):
+                    v = str(v)
                 v=md.getitem('sql_quote__',0)(v)
                 #if find(v,"\'") >= 0: v=join(split(v,"\'"),"''")
                 #v="'%s'" % v



More information about the Zope-Checkins mailing list