Jinja2 was not working with Russian strings stored in SQLite.
Ubuntu 10.04
Python 2.6.5
mitsuhiko-flask-8ed051d
The following corrections to eliminate possible errors:
In file: /jinja2/_markupsafe/_native.py
was:
return Markup(s)
.replace('&', '&')
.replace('>', '>')
.replace('<', '<')
.replace("'", ''')
.replace('"', '"')
)
become:
return Markup(s if type(s)!=type("") else s.decode("utf-8") \
.replace('&', '&')
.replace('>', '>')
.replace('<', '<')
.replace("'", ''')
.replace('"', '"')
)
In the file /jinja2/_markupsafe/__init__.py:
was:
return unicode.__new__(cls, base)
become:
return unicode.__new__(cls, base if type(base)!=type("") \
else base.decode("utf-8"))
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.