Skip to content

Commit

Permalink
defining coding in Application settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pkalmus committed Jun 30, 2010
1 parent 5a8876b commit aee6244
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tornado/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class RequestHandler(object):
"""
SUPPORTED_METHODS = ("GET", "HEAD", "POST", "DELETE", "PUT")

def __init__(self, application, request, transforms=None,coding='utf-8'):
def __init__(self, application, request, transforms=None):
self.application = application
self.request = request
self.coding=coding
self.coding=application.coding
self._headers_written = False
self._finished = False
self._auto_finish = True
Expand Down Expand Up @@ -936,7 +936,7 @@ class Application(object):
and we will serve /favicon.ico and /robots.txt from the same directory.
"""
def __init__(self, handlers=None, default_host="", transforms=None,
wsgi=False, **settings):
wsgi=False,coding='utf-8', **settings):
if transforms is None:
self.transforms = []
if settings.get("gzip"):
Expand All @@ -950,6 +950,7 @@ def __init__(self, handlers=None, default_host="", transforms=None,
self.settings = settings
self.ui_modules = {}
self.ui_methods = {}
self.coding=coding
self._wsgi = wsgi
self._load_ui_modules(settings.get("ui_modules", {}))
self._load_ui_methods(settings.get("ui_methods", {}))
Expand Down

0 comments on commit aee6244

Please sign in to comment.