diff --git a/lib/pyulib/src/ulib/web/pages.py b/lib/pyulib/src/ulib/web/pages.py index a5f0104..b5da14e 100644 --- a/lib/pyulib/src/ulib/web/pages.py +++ b/lib/pyulib/src/ulib/web/pages.py @@ -233,6 +233,10 @@ class Page(object): def redirect(self, path, **kw): return web.redirect(web.url(path, **kw)) + def _utf8plaintext(self, text): + web.header("Content-Type", "text/plain; charset=utf-8", True) + return text.encode("utf-8") + def r(self, name, *args, **kw): templatedir = getattr(self, 'TEMPLATEDIR', None) if templatedir is not None: