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

Already on GitHub? Sign in to your account

Wrong encoding for files with extension ≠ .html (xml, json, txt…) #62

Closed
naholyr opened this Issue Jan 29, 2013 · 2 comments

Comments

Projects
None yet
1 participant

naholyr commented Jan 29, 2013

I was trying to generate a "/rss.xml" based on a content handler : articles are taken from the punch-blog-content-handler but given the extension is .xml and not .html, then cache store will write it using binary encoding.

That's not what I want because in case of text file it will break encoding (I end with my UTF8 strings getting written as latin-1).

I fixed it with a generator hook, but it should probably be a core options. We may let user provide a list of paths or extensions that should be written using utf8 encoding instead of binary. Or if this is possible (I'm not sure you can distinguish them, but who knows) never use binary for generated files (from content handler) versus physically copied files.

naholyr commented Jan 29, 2013

Note: here's the why
S lection_018

naholyr commented Jan 29, 2013

And here's the third-party fix: https://github.com/naholyr/punch-fix-utf8

@laktek laktek closed this in a14174b Apr 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment