Added test of "js inline" with non-ascii character #305

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

marselester commented Aug 24, 2012

Test reproduces 'ascii' codec can't encode character u'\u2014' when using non-ascii characters in {% compress js inline %}.

This pull request fails (merged 86b1a24 into b3a3419).

Owner

diox commented Dec 13, 2012

This is interesting. I've tried reverting the changes pushed in #271 and that fixed it.

Looking at it closer, I don't understand why the .decode('utf-8') was added, because when rendering I always get a unicode (well, django.utils.safestring.SafeUnicode) string output, so no decoding is necessary.

Even better, removing that .decode('utf-8') introduced in #271 not only fixes your testcase, but it doesn't fail on the one added in that pull request.

Ccing @midiotthimble who wrote the original issue and pull request in case he can help us understand :)

@diox diox closed this in 8a9a336 Mar 18, 2013

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