1.1 --- a/macros/IncludeComments.py Sun Nov 03 00:45:49 2013 +0100
1.2 +++ b/macros/IncludeComments.py Sun Nov 03 00:56:14 2013 +0100
1.3 @@ -17,6 +17,7 @@
1.4 from MoinMoin.user import User
1.5 from MoinMoin.wikiutil import escape
1.6 import re
1.7 +import codecs
1.8
1.9 try:
1.10 from cStringIO import StringIO
1.11 @@ -129,13 +130,13 @@
1.12
1.13 # Output the included page.
1.14
1.15 - strfile = StringIO()
1.16 + strfile = codecs.getwriter("utf-8")(StringIO())
1.17 request.redirect(strfile)
1.18 try:
1.19 inc_page.send_page(content_only=True,
1.20 omit_footnotes=True,
1.21 count_hit=False)
1.22 - append(strfile.getvalue())
1.23 + append(unicode(strfile.getvalue(), "utf-8"))
1.24 finally:
1.25 request.redirect()
1.26