Closed mueslo closed 8 years ago
I’m running into this issue as well. As far as I can tell the string codec issues are confined to bytes_to_ascii and perhaps ascii_to_bytes.
It’s should be safe to use UTF-8 as the encoding here as it’s ASCII compatible.
And my fifty cents. Just to state, that issue is still actual.
Should be fixed now, will put a release on PyPI later today.
2.7.3 release is on PyPI
https://github.com/chtd/psycopg2cffi/blob/ec8a83a07507bd18eb803955d30ab3b3d7ad4a79/psycopg2cffi/_impl/connection.py#L828
Postgres can return utf8 bytes in exceptions, e.g. when a query fails which contains utf8-bytes to be inserted into the database.
With regular psycopg2 I get the full error printed (which contains umlauts from the query).