jezdez / django-staticfiles

[Unmaintained] A Django app that provides helpers for serving static files, used in Django and Pinax.

Home Page:http://django-staticfiles.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnicodeError while post processing

thinxer opened this issue · comments

In django-staticfiles/staticfiles/storage.py, post_processing, the original_file is just read but not decoded, leading to UnicodeError if the original_file contains non-ascii characters.

https://github.com/jezdez/django-staticfiles/blob/develop/staticfiles/storage.py#L266

However, it may be not possible to determine the correct encoding of the file. Maybe making the default to 'utf-8' is better.