Skip to content

Commit

Permalink
Merge pull request #16 from aexeagmbh/master
Browse files Browse the repository at this point in the history
open file as utf-8
  • Loading branch information
yakky committed Jul 7, 2014
2 parents 11c16ed + ba9d798 commit 19537fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion statictemplate/__init__.py
@@ -1 +1 @@
__version__ = '2.0'
__version__ = '2.0.1'
3 changes: 2 additions & 1 deletion statictemplate/management/commands/statictemplate.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from contextlib import contextmanager
import codecs
from optparse import make_option
try:
import urlparse
Expand Down Expand Up @@ -92,7 +93,7 @@ def handle(self, template, language=None, extra_request=None, **options):
strict_parsing=True))
output = make_static(template, language, request)
if options.get('output', False):
with open(options.get('output'), 'w') as output_file:
with codecs.open(options.get('output'), 'w', 'utf-8') as output_file:
output_file.write(output)
else:
self.stdout.write(output)
Expand Down

0 comments on commit 19537fe

Please sign in to comment.