web/views/csvexport.py
changeset 10695 321b99973b69
parent 10666 7f6b5f023884
child 10907 9ae707db5265
--- a/web/views/csvexport.py	Tue Sep 22 14:18:14 2015 +0200
+++ b/web/views/csvexport.py	Wed Sep 16 17:07:26 2015 +0200
@@ -20,6 +20,7 @@
 __docformat__ = "restructuredtext en"
 from cubicweb import _
 
+from six import PY2
 from six.moves import range
 
 from cubicweb.schema import display_name
@@ -31,7 +32,7 @@
     """mixin class for CSV views"""
     templatable = False
     content_type = "text/comma-separated-values"
-    binary = True # avoid unicode assertion
+    binary = PY2 # python csv module is unicode aware in py3k
     csv_params = {'dialect': 'excel',
                   'quotechar': '"',
                   'delimiter': ';',