Permalink
Browse files

utf-8 encoding issues. fixes #7

  • Loading branch information...
1 parent becf4e9 commit 2fe760812052c9a2623c8057248e5c3411069f1d @Rydgel committed Dec 20, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app.py
  2. +1 −1 helpers/pil.py
View
2 app.py
@@ -92,7 +92,7 @@ def favicon():
@app.route('/<file_name>.txt')
def send_text_file(file_name):
"""Send your static text file."""
- file_dot_text = '{0}.txt'.format(file_name)
+ file_dot_text = u'{0}.txt'.format(file_name)
return app.send_static_file(file_dot_text)
View
@@ -42,7 +42,7 @@ def _calculate_font_size(width, height):
def _choose_font(font_size, font=None):
"""Choosing a font, the fallback is Yanone"""
dirname = os.path.dirname
- font_path = '{0}/font/{1}.otf'.format(dirname(dirname(__file__)), font)
+ font_path = u'{0}/font/{1}.otf'.format(dirname(dirname(__file__)), font)
try:
return ImageFont.truetype(font_path, font_size)
except IOError:

0 comments on commit 2fe7608

Please sign in to comment.