Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68181ed

Browse filesBrowse 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
Copy full SHA for 68181ed

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎MySQLdb/cursors.py

Copy file name to clipboardExpand all lines: MySQLdb/cursors.py
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.