changeset 9:5dc4bfe67c20 trunk

Actually use the specified encoding in `Stream.render()`.
author cmlenz
date Sun, 04 Jun 2006 11:00:41 +0000
parents 3710e3d0d4a2
children f77f7a91aa46
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