Edgewall Software

Ticket #189 (closed defect: invalid)

Opened 8 years ago

Last modified 3 years ago

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:


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


Change History

Changed 8 years ago by Matt Chaput <matt@…>

  • status changed from new to closed
  • resolution set to invalid

Nevermind, I had accidentally "contaminated" the stream with str objects. (C'mon, Python 3000!)

Add/Change #189 (TextSerializer mistakenly calls unicode() on TEXT data)


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

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