unicode-error in header_text

Bug #405316 reported by Philip Bauer
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Singing & Dancing
New
Undecided
Unassigned

Bug Description

Usage of umlauts (e.g. ü) in header_text leads to an unicodeDecodeError on preview and sending:

(...)
  Module collective.dancing.browser.sendnewsletter, line 51, in _assemble_messages
  Module collective.singing.scheduler, line 117, in __call__
  Module collective.singing.scheduler, line 109, in render_message
  Module collective.dancing.composer, line 223, in render
  Module collective.dancing.composer, line 175, in _vars
  Module collective.dancing.composer, line 173, in subs
  Module string, line 205, in safe_substitute
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)

Strangely, using an umlaut in footer_text does not produce this error.

Regards,
Philip

Revision history for this message
Antti Moilanen (talakkuna) wrote :

I'm also affected by this bug. I'm using the newest collective.dancing version 0.9.2. Fixed this locally by adding .decode("utf-8") to the code like this:

vars['header_text'] = fix_urls(self.header_text or u"").decode("utf-8")

Regards,
Antti

Revision history for this message
Daniel Nouri (daniel.nouri) wrote :

Feel free to fix in trunk so it can be in 0.9.3. And add a test for extra karma.

Read http://dev.plone.org/collective for instructions on how to get access to the collective, if you don't have it.

Regards,
Daniel

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.