Closed tdesvenain closed 7 years ago
@vincentfretin @ebrehault @cedricmessiant Can you review this please ?
You didn't seem to have changed the api so I guess you can merge.
right
2017-01-17 10:10 GMT+01:00 Vincent Fretin notifications@github.com:
@vincentfretin commented on this pull request.
In src/collective/excelexport/view.py https://github.com/collective/collective.excelexport/pull/5:
@@ -140,17 +146,15 @@ def _format_render(self, render): elif not isinstance(render, unicode): render = unicode(render)
- return render.encode(encoding=self.encoding)
- try:
- return render.encode(encoding=self.encoding)
- except UnicodeEncodeError:
try default encoding
ok, maybe you should be explicit and try render.encode(encoding="utf-8") as fallback instead of str(render) which normally is an ascii encoding unless you changed sys.setdefaultencoding?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/collective/collective.excelexport/pull/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AAU395pIrU9myd0Nfl3I_Lwyr2TJ0ZzEks5rTIWDgaJpZM4LFKOE .
-- Thomas Desvenain
Téléphone : 09 51 37 35 18
Removes some code duplication Makes it easier to programmatically create export file data