Ticket #189 (closed defect: invalid)
TextSerializer mistakenly calls unicode() on TEXT data
| Reported by: | Matt Chaput <matt@…> | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | 0.5 |
| Component: | Serialization | Version: | devel |
| Keywords: | Cc: |
Description
The TextSerializer.__call__() method yields the text data like this:
yield unicode(data)
I believe this is incorrect, since (a) the "data" of a TEXT event should already be Unicode, and (b) any data that IS Unicode (ie contains chars >127) will raise an error because unicode() runs its argument through the ASCII decoder.
I think it should be just yield data, or paranoid-ly:
assert isinstance(data, unicode) yield data
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
