Homec4science

WebStyle: use utf8 for jinja2 str to unicode

Authored by Lars Holm Nielsen <lars.holm.nielsen@cern.ch> on Feb 14 2013, 16:46.

Description

WebStyle: use utf8 for jinja2 str to unicode

  • Jinja2 requires all strings to be unicode. Invenio however operates with UTF8 encoded 8-bit strings. Jinja2 will automatically convert non-unicode objects into unicode objects, but using ASCII codec. This function replaces the escape function and Markup class in Jinja2, to use UTF8 codec instead when converting str objects into unicode objects.

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>

Details

Committed
Tibor Simko <tibor.simko@cern.ch>Feb 18 2013, 13:13
Parents
R3600:aa59bfdd5125: InvenioUpgrader: partial fix for SQLAlchemy init
Branches
Unknown
Tags
Unknown

Event Timeline

Tibor Simko <tibor.simko@cern.ch> committed R3600:3d902f95329c: WebStyle: use utf8 for jinja2 str to unicode (authored by Lars Holm Nielsen <lars.holm.nielsen@cern.ch>).Feb 18 2013, 13:13