Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1329 (closed defect: fixed)

Opened 12 years ago

Last modified 8 years ago

UnicodeError on nested Mako + Genshi

Reported by: __pv Owned by: alberto
Priority: normal Milestone: 2.0
Component: ToscaWidgets Version: 1.0
Severity: normal Keywords:


The following code results to an UnicodeError?, although it seems to me that it should work:

from toscawidgets.api import *
from toscawidgets.widgets.forms import *

class TestField(FormField):
    engine_name = "mako" # results to UnicodeError
    #engine_name = "genshi"  # works
    template = u"<span>${some_value}</span>"
    params = ["some_value"]

class TestForm(Form):
    class fields(WidgetsList):
        item = TestField()

form = TestForm()

print form.display(child_args=dict(item=dict(some_value=unicode("Hello w\xc3\xb8rld", 'utf-8'))))

I guess Mako spits out utf-8 str and Genshi chokes on this.


mako_unicode_test.diff Download (1.6 KB) - added by alberto 12 years ago.

Change History

Changed 12 years ago by alberto

comment:1 Changed 8 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Has been moved to ToscaWidgets and was fixed there.

Note: See TracTickets for help on using tickets.