collective/Products.EasyNewsletter — Issue #11: csv download fail if the header to translate have non ascii characters
Author: nueces
Created: 2012-02-24 19:05:37+00:00
State: open

Traceback.
```
2012-02-24 15:58:52 ERROR Zope.SiteErrorLog 1330109932.70.362284770359 http://localhost:8080/Plone/boletin/@@download_csv
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.EasyNewsletter.browser.subscribers, line 186, in __call__
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 10: ordinal not in range(128)
```

Pdb traceback
```
> newsletter.buildout/src/Products.EasyNewsletter/Products/EasyNewsletter/browser/subscribers.py(187)__call__()
186 CSV_HEADER_I18N = [self.context.translate(_(x)) for x in CSV_HEADER]
--> 187 csvWriter.writerow(CSV_HEADER_I18N)
188 for subscriber in ctool(portal_type = 'ENLSubscriber',

ipdb> CSV_HEADER_I18N
[u'saludo', u'nombre completo', u'correo electronico', u'organizaci\xf3n']
ipdb> csvWriter.writerow(CSV_HEADER_I18N)
*** UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 10: ordinal not in range(128)
```

The problem is with the 4 item 'organización'.