diff options
author | Jack Miller <jack@codezen.org> | 2010-10-14 15:49:08 +0300 |
---|---|---|
committer | Antti Kaihola <akaihol+github@ambitone.com> | 2010-10-14 15:49:08 +0300 |
commit | b6828c731162ba77015cc6cca837380c17407dc5 (patch) | |
tree | fce0571b964ae3661c13720f8596f1e7a3b8f102 | |
parent | 62481c6366a562547b775b4415b43361933e7926 (diff) | |
download | pycco-b6828c731162ba77015cc6cca837380c17407dc5.tar.gz |
Fixes #1: applied themoken's UTF-8 patch
See issue 1: http://github.com/fitzgen/pycco/issues#issue/1
Original patch: http://codezen.org/static/encode.patch
-rwxr-xr-x | pycco | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -135,7 +135,7 @@ def generate_html(source, sections): }) print "pycco = %s -> %s" % (source, dest) fh = open(dest, "w") - fh.write(html) + fh.write(html.encode(getpreferredencoding())) fh.close() #### Helpers & Setup @@ -152,6 +152,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 Pycco supports, mapping the file extension to # the name of the Pygments lexer and the symbol that indicates a comment. To |