Author inada.naoki
Recipients ezio.melotti, inada.naoki, python-dev, r.david.murray, serhiy.storchaka, vstinner
Date 2015-10-10.19:15:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444504554.0.0.646010145038.issue24870@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-10-10 19:15:54inada.naokisetrecipients: + inada.naoki, vstinner, ezio.melotti, r.david.murray, python-dev, serhiy.storchaka
2015-10-10 19:15:54inada.naokisetmessageid: <1444504554.0.0.646010145038.issue24870@psf.upfronthosting.co.za>
2015-10-10 19:15:53inada.naokilinkissue24870 messages
2015-10-10 19:15:53inada.naokicreate