mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +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.tilevel = tilevel
|
||||
self.typecasts = typecasts
|
||||
self.encoding = enc
|
||||
if enc is None or enc == "":
|
||||
self.encoding = "utf-8"
|
||||
else:
|
||||
self.encoding = enc
|
||||
self.failures = 0
|
||||
self.calls = 0
|
||||
self.make_mappings()
|
||||
|
|
Loading…
Reference in New Issue
Block a user