Skip to content

Commit ef102f9

Browse files
committed
convert unicode strings to UTF8 before printing to the user
1 parent dea8e77 commit ef102f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def sqlify(obj):
285285
elif datetime and isinstance(obj, datetime.datetime):
286286
return repr(obj.isoformat())
287287
else:
288+
if isinstance(obj, unicode): obj = obj.encode('utf8')
288289
return repr(obj)
289290

290291
def sqllist(lst):

0 commit comments

Comments
 (0)