Skip to content

Commit

Permalink
utf-8 encoding issues. fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Rydgel committed Dec 20, 2012
1 parent becf4e9 commit 2fe7608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.py
Expand Up @@ -92,7 +92,7 @@ def favicon():
@app.route('/<file_name>.txt') @app.route('/<file_name>.txt')
def send_text_file(file_name): def send_text_file(file_name):
"""Send your static text file.""" """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) return app.send_static_file(file_dot_text)




Expand Down
2 changes: 1 addition & 1 deletion helpers/pil.py
Expand Up @@ -42,7 +42,7 @@ def _calculate_font_size(width, height):
def _choose_font(font_size, font=None): def _choose_font(font_size, font=None):
"""Choosing a font, the fallback is Yanone""" """Choosing a font, the fallback is Yanone"""
dirname = os.path.dirname 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: try:
return ImageFont.truetype(font_path, font_size) return ImageFont.truetype(font_path, font_size)
except IOError: except IOError:
Expand Down

0 comments on commit 2fe7608

Please sign in to comment.