Message252738
UTF-8 and Latin1 are typical encoding for MySQL query.
When inserting BLOB:
# Decode binary data
x = data.decode('ascii', 'surrogateescape')
# %-format query
psql = sql % (escape(x),) # sql is unicode
# Encode sql to connection encoding (latin1 or utf8)
query_bytes = psql.encode('utf-8', 'surrogateescape')
So decoder speedup is required only for ascii, but encoder speedup is required for utf-8 and latin1.
I'll consider other ways including creating speedup module and register it on PyPI. |
|
Date |
User |
Action |
Args |
2015-10-10 19:15:54 | methane | set | recipients:
+ methane, vstinner, ezio.melotti, r.david.murray, python-dev, serhiy.storchaka |
2015-10-10 19:15:54 | methane | set | messageid: <1444504554.0.0.646010145038.issue24870@psf.upfronthosting.co.za> |
2015-10-10 19:15:53 | methane | link | issue24870 messages |
2015-10-10 19:15:53 | methane | create | |
|