From 9332c9dcac13f7d1ba5cb16c4ab0cc6493f9175f Mon Sep 17 00:00:00 2001 From: Pyotr Ermishkin Date: Sun, 25 Jan 2015 15:28:45 +0300 Subject: [PATCH] Unicode support was added to UiRequest.py --- src/Ui/UiRequest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index 63b5367e..5f99df52 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -84,8 +84,9 @@ class UiRequest: def render(self, template_path, *args, **kwargs): #template = SimpleTemplate(open(template_path), lookup=[os.path.dirname(template_path)]) #yield str(template.render(*args, **kwargs).encode("utf8")) - template = open(template_path).read() - yield template.format(**kwargs) + ENCODING = 'utf-8' + template = unicode(open(template_path).read(), ENCODING) + yield template.format(**kwargs).encode(ENCODING) # - Actions -