Static Files not encoded in OS/locale default crash Standalone Flask App
derekjamescurtis opened this issue · 2 comments
On a windows box with CP-1252 as the default character set, I can't run tests against my code (angular 1.4.1 installed from bower) because the the angular.js file is encoded in UTF-8 and apparently contains some non-latin characters somewhere (simple workaround is to use the minified version in my src_files).
I think a reasonable solution would be to try to check the file encoding first (chardet or something https://pypi.python.org/pypi/chardet), before reading the contents out.
This guy is the problem
https://github.com/jasmine/jasmine-py/blob/master/jasmine/standalone.py#L36
I poked around a bit, and I think this is going to take some work to get running for python 2 & 3. It probably just makes sense to convert everything to UTF-8.
I'll look at this over the next couple days.
I just pushed a change that I hope will fix your issue. Let me know if it doesn't work.
pip install git+git://github.com/jasmine/jasmine-py.git@master