Edgewall Software

Ticket #43 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

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:

Description

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

Change History

Changed 8 years ago by cmlenz

  • status changed from new to closed
  • component changed from General to Parsing
  • resolution set to fixed

Fixed in [257].

Add/Change #43 (Passing unicode to Template constructor fails)

Author


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


Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.