Commits

Anonymous committed 6a8ea6a

Handle export of non-ASCII text fieids by encoding to UTF-8.

Comments (0)

Files changed (1)

shapes/views/export.py

                 value = getattr(item, field.name)
                 if value is not None and isinstance(field, ForeignKey):
                     value = getattr(value, 'pk')
+                if isinstance(value, unicode):
+                    value = value.encode('utf-8')
 
                 # truncate the field name.
                 # TODO: handle nonunique truncated field names.