Edgewall Software

Opened 12 years ago

Closed 12 years ago

#43 closed defect (fixed)

Passing unicode to Template constructor fails

Reported by: oliver.cope@… Owned by: cmlenz
Priority: major Milestone: 0.3
Component: Parsing Version: 0.2
Keywords: Cc:


Passing a unicode string with non-ascii characters to the markup.template.Template or markup.XML raises an exception:

>>> import markup.template
>>> markup.template.Template(u'<div>\u2013</div>')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "markup/template.py", line 755, in __init__
  File "markup/template.py", line 774, in parse
  File "markup/core.py", line 202, in _ensure
  File "markup/input.py", line 316, in _coalesce
  File "markup/input.py", line 106, in _generate
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 3: ordinal not in range(128)

The markup.HTML function appears unaffected.

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by cmlenz

  • Component changed from General to Parsing
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [257].

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.