peterbe / django-static

Template tags for better serving static files from templates in Django
BSD 2-Clause "Simplified" License
193 stars 28 forks source link

Fix for UnicodeDecodeError when optimizing multiple files (i.e. when using StringIO) and at least one of the files contains unicode characters #21

Closed dnerdy closed 12 years ago

dnerdy commented 12 years ago

Fixed unicode decode error when optimizing combined files that contain unicode

new_file_content.getvalue() returns a str, but codecs.open(new_filepath, 'w', 'utf-8').write() expects unicode, else it b0rks

peterbe commented 12 years ago

Thanks!