Re: Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 09:25 -0800, Ben Gerdemann wrote: > Hello, > > I'm having problems using {% ifequal s1 "some text" %} to compare > strings with extended characters in Django templates. When string s1 > contains ascii characters >127, I get exceptions in the template > rendering. I know

Re: Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Ben Gerdemann
Sometimes there's nothing like describing a problem to someone else to help you solve it. :) I should have marked the Python strings as Unicode like this and everything works now: def test(request): return render_to_response("test.html", { "s1":

Problem with encoding and using ifequal in Django templates

2009-01-27 Thread Ben Gerdemann
Hello, I'm having problems using {% ifequal s1 "some text" %} to compare strings with extended characters in Django templates. When string s1 contains ascii characters >127, I get exceptions in the template rendering. What am I doing wrong? I'm using UTF-8 coding throughout the rest of