Message252738
| Author | methane |
|---|---|
| Recipients | ezio.melotti, methane, 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: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 | |