mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-11 00:32:22 +03:00
Fix encoding when Zope explicitly pass empty "enc" argument
This commit is contained in:
parent
6fc167a7b1
commit
512b41cc9c
|
@ -39,7 +39,10 @@ class DB(TM, dbi_db.DB):
|
||||||
self.dsn = dsn
|
self.dsn = dsn
|
||||||
self.tilevel = tilevel
|
self.tilevel = tilevel
|
||||||
self.typecasts = typecasts
|
self.typecasts = typecasts
|
||||||
self.encoding = enc
|
if enc is None or enc == "":
|
||||||
|
self.encoding = "utf-8"
|
||||||
|
else:
|
||||||
|
self.encoding = enc
|
||||||
self.failures = 0
|
self.failures = 0
|
||||||
self.calls = 0
|
self.calls = 0
|
||||||
self.make_mappings()
|
self.make_mappings()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user