Skip to content

Commit 68181ed

Browse files
authored
Merge pull request PyMySQL#91 from jinto/patch-1
unicode string in argument of string raises error
2 parents 66029d6 + ee6ad1c commit 68181ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MySQLdb/cursors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def callproc(self, procname, args=()):
355355
','.join(['@_%s_%d' % (procname, i)
356356
for i in range(len(args))]))
357357
if isinstance(q, unicode):
358-
q = q.encode(db.unicode_literal.charset)
358+
q = q.encode(db.unicode_literal.charset, 'surrogateescape')
359359
self._query(q)
360360
self._executed = q
361361
if not self._defer_warnings:

0 commit comments

Comments
 (0)