﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5953	UnicodeDecodeError in blocktrans	Cedric Rossi <cedric@…>	nobody	"In [6675] the following:
{{{
{% blocktrans with title as the_title %}{{ the_title }}{% endblocktrans %}
}}}

will fail with the following traceback, if title is a string containing non ascii characters:
{{{
Traceback (most recent call last):
File ""/Users/cedric/src/koffeeweb/django/template/__init__.py"" in render_node
  814. result = node.render(context)
File ""/Users/cedric/src/koffeeweb/django/templatetags/i18n.py"" in render
  77. result = re.sub('%(?!\()', '%%', result) % context

  UnicodeDecodeError at /fail/
  'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
}}}

On the other hand, this:
{{{
{% blocktrans with title|escape as the_title %}{{ the_title }}{% endblocktrans %}
}}}

works as expected.

I couldn't reproduce the problem in [6636], so this has probably been introduced recently (auto-escaping stuff?)

Please see the attached project, which defines two urls: /fail/ and /pass/ showing the problem"		closed	Template system	dev		fixed		cedric@…	Accepted	0	0	0	0	0	0
