diff --git a/pocco b/pocco index 67a7a7f..0282f1a 100755 --- a/pocco +++ b/pocco @@ -105,7 +105,7 @@ def generate_html(source, sections): }) print "pocco = %s -> %s" % (source, dest) fh = open(dest, "w") - fh.write(html) + fh.write(html.encode(getpreferredencoding())) fh.close() #### Helpers & Setup @@ -119,6 +119,7 @@ from markdown import markdown from os import path from pygments import lexers, formatters from subprocess import Popen, PIPE +from locale import getpreferredencoding # A list of the languages that Pocco supports, mapping the file extension to # the name of the Pygments lexer and the symbol that indicates a comment. To