changeset 9:3dc28e165273

Actually use the specified encoding in `Stream.render()`.
author cmlenz
date Sun, 04 Jun 2006 11:00:41 +0000
parents ea47069a901c
children c5890ef863ba
files markup/core.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/markup/core.py
+++ b/markup/core.py
@@ -87,7 +87,7 @@
         """
         output = u''.join(list(self.serialize(method=method, **kwargs)))
         if encoding is not None:
-            return output.encode('utf-8')
+            return output.encode(encoding)
         return output
 
     def select(self, path):
Copyright (C) 2012-2017 Edgewall Software