Roundup Tracker - Issues


Author techtonik
Recipients antmail, ber, pcaulagi, shammash, techtonik
Date 2015-01-29.19:16:57
Message-id <>
In-reply-to <13949334.tHRCP5sAgJ@kymo.gruen>
On Thu, Jan 29, 2015 at 12:34 AM, Bernhard Reiter
<> wrote:
> Hmmm.. I've checked the db file contents and it was in utf8.
> Actually the str objects are in utf-8, that is why the encoding() function
> needs to know that it is a str with utf-8 encoding.

Do you mean that msg.content.hyperlinked() here is UTF8?
<pre>{{ msg.content.hyperlinked() }}</pre>
And that Jinja2 fails, because it expects unicode() object, and
not binary string that is UTF8?

> I think an okay solution would be to
> a) write a test case that fills in strings with utf-8 and tries to render
> all templates from "jinja2" template to check for errors.
> b) use an custom filter "u()" and add it to almost all template calls
> where the result is needed as text. Problem: Some calls with end up with
> str objects, other with roundup objects where jinja2 seems to call str()
> on them. So my testing u() function needs to accomodate for this.

What if we make Roundup use unicode objects internally instead of
binary str with UTF-8? It will solve the problem and make it forward
compatible with Python 3. For now the solution may be to patch Jinja2
to assume that all raw strings are in UTF8 and not ASCII (which I
think is only logical).
Date User Action Args
2015-01-29 19:16:58techtoniksetrecipients: + techtonik, ber, pcaulagi, shammash, antmail
2015-01-29 19:16:58techtoniklinkissue2550811 messages
2015-01-29 19:16:57techtonikcreate