From 8e9e02d6594e1bff19bc7f0dbf975cf4cd72567f Mon Sep 17 00:00:00 2001 From: wiemann Date: Mon, 26 Feb 2007 17:56:05 +0000 Subject: do not use codecs.open, because it always uses binary mode git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4938 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/html4css1/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docutils/writers/html4css1/__init__.py b/docutils/writers/html4css1/__init__.py index e1b472383..693672b76 100644 --- a/docutils/writers/html4css1/__init__.py +++ b/docutils/writers/html4css1/__init__.py @@ -17,7 +17,6 @@ __docformat__ = 'reStructuredText' import sys import os import os.path -import codecs import time import re from types import ListType @@ -159,9 +158,8 @@ class Writer(writers.Writer): self.output = self.apply_template() def apply_template(self): - template_file = codecs.open( - self.document.settings.template, 'r', 'utf-8') - template = template_file.read() + template_file = open(self.document.settings.template) + template = unicode(template_file.read(), 'utf-8') template_file.close() subs = self.interpolation_dict() return template % subs -- cgit v1.2.1