Fix the UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) #154

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

when rendering template within non-ASCII strings (non-unicodes)

@vintozver vintozver Fix issue with
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

when rendering template within non-ASCII strings (non-unicodes)
17af9b5
Contributor

plaes commented Nov 6, 2012

I also ran into following issue:

  File .../lib/python2.7/site-packages/jinja2/_markupsafe/_native.py", line 21, in escape
    return Markup(unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
Owner

mitsuhiko commented May 19, 2013

That's not supposed to happen. Why are you passing bytestrings to Markup?

mitsuhiko closed this May 19, 2013

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