8 Jan
2014
8 Jan
'14
3:38 a.m.
On Wed, 8 Jan 2014 20:31:10 +0900
INADA Naoki
You're right. I've not considered using surrogateescape here.
But MySQL connection may be not utf8. It's default latin1 and you can use many encoding. Some encoding doesn't ensure roundtrip. In such encoding,
[...]
But I think decode/encode with surrogateescape is not only slow, but also dangerous when using encoding except ascii or utf8.
You're right. Thanks exposing your use case, I think it's a good data point for the bytes formatting PEP. Regards Antoine.