summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-03-10 04:47:38 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-03-10 04:47:38 +0000
commitd333168e00cd8c56425afce3906e8f7439f1427a (patch)
treeb29833ddb8cb0bddd04ac46951fe16f424054715 /lib/sqlalchemy/engine.py
parent612205c3fd0e4f1f86ea7240ac7da6a681f66f44 (diff)
downloadsqlalchemy-d333168e00cd8c56425afce3906e8f7439f1427a.tar.gz
utf-8 encoding is switchable at the engine level, ticket [ticket:101]
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r--lib/sqlalchemy/engine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py
index d61320533..269402f81 100644
--- a/lib/sqlalchemy/engine.py
+++ b/lib/sqlalchemy/engine.py
@@ -180,7 +180,7 @@ class SQLEngine(schema.SchemaEngine):
SQLEngines are constructed via the create_engine() function inside this package.
"""
- def __init__(self, pool=None, echo=False, logger=None, default_ordering=False, echo_pool=False, echo_uow=False, convert_unicode=False, **params):
+ def __init__(self, pool=None, echo=False, logger=None, default_ordering=False, echo_pool=False, echo_uow=False, convert_unicode=False, encoding='utf-8', **params):
"""constructs a new SQLEngine. SQLEngines should be constructed via the create_engine()
function which will construct the appropriate subclass of SQLEngine."""
# get a handle on the connection pool via the connect arguments
@@ -197,6 +197,7 @@ class SQLEngine(schema.SchemaEngine):
self.echo = echo
self.echo_uow = echo_uow
self.convert_unicode = convert_unicode
+ self.encoding = encoding
self.context = util.ThreadLocal(raiseerror=False)
self._ischema = None
self._figure_paramstyle()