[rql2sql] #1089207: do not encode Unicode strings from RQL statements to db encoding
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Jun 2010 17:30:15 +0200
changeset 5821 656c974961c4
parent 5820 b176ac0e3aaa
child 5822 3d4e58a741a4
[rql2sql] #1089207: do not encode Unicode strings from RQL statements to db encoding
server/sources/__init__.py
server/sources/rql2sql.py
server/ssplanner.py
--- a/server/sources/__init__.py	Mon Jun 21 17:10:25 2010 +0200
+++ b/server/sources/__init__.py	Mon Jun 21 17:30:15 2010 +0200
@@ -15,9 +15,8 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""cubicweb server sources support
+"""cubicweb server sources support"""
 
-"""
 __docformat__ = "restructuredtext en"
 
 from os.path import join, splitext
--- a/server/sources/rql2sql.py	Mon Jun 21 17:10:25 2010 +0200
+++ b/server/sources/rql2sql.py	Mon Jun 21 17:30:15 2010 +0200
@@ -1146,8 +1146,6 @@
                 _id = _id.encode()
         else:
             _id = str(id(constant)).replace('-', '', 1)
-            if isinstance(value, unicode):
-                value = value.encode(self.dbencoding)
             self._query_attrs[_id] = value
         return '%%(%s)s' % _id
 
--- a/server/ssplanner.py	Mon Jun 21 17:10:25 2010 +0200
+++ b/server/ssplanner.py	Mon Jun 21 17:30:15 2010 +0200
@@ -15,9 +15,8 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""plan execution of rql queries on a single source
+"""plan execution of rql queries on a single source"""
 
-"""
 from __future__ import with_statement
 
 __docformat__ = "restructuredtext en"