Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from_string doesn't look at options for encoding? #28

Open
jeffgros opened this issue Aug 3, 2018 · 0 comments
Open

from_string doesn't look at options for encoding? #28

jeffgros opened this issue Aug 3, 2018 · 0 comments

Comments

@jeffgros
Copy link

jeffgros commented Aug 3, 2018

Hi there! Thanks for sharing this project! It has been very helpful.

Imgkit works very well for the majority of cases. My issue lies when I send it characters that are greater than 0x7f, which I would like to be interpreted using latin-1.

To indicate I would like to use latin-1, I've passed options with encoding set to latin-1 to my from_string function call: imgkit.from_string(htmlString, output.png, options={'encoding':'latin-1'})

I'm getting an UnicodeDecodeError on line 220 of imgkit.py. Looking at the code, it appears to be forcing utf-8.

Perhaps "from_string" does not use options? Is there something else I'm doing wrong?

Thanks in advance!

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

No branches or pull requests

1 participant