Fix encoding when Zope explicitly pass empty "enc" argument

This commit is contained in:
Federico Di Gregorio 2011-10-20 09:52:22 +02:00
parent 6fc167a7b1
commit 512b41cc9c

View File

@ -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()