Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Static Files not encoded in OS/locale default crash Standalone Flask App #28

Closed
derekjamescurtis opened this issue Nov 8, 2015 · 2 comments

Comments

@derekjamescurtis
Copy link

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

@Gerg
Copy link
Contributor

Gerg commented Nov 9, 2015

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.

Gerg added a commit that referenced this issue Nov 11, 2015
Detect and decode user source and test files.

[#28][#107891534]
@Gerg
Copy link
Contributor

Gerg commented Nov 11, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants