Commits

Anonymous committed 298c683

support unicode filenames with patch from Gilles - fixes issue #12

  • Participants
  • Parent commits e57a5a1

Comments (0)

Files changed (2)

  * Jared Kibele
  * Mitch Chapman
  * Luiz Vital
+ * Gilles Bassière

shapes/views/export.py

 import datetime
 import cStringIO
 from django.http import HttpResponse
+from django.utils.encoding import smart_str
 from django.contrib.gis.db.models.fields import GeometryField
 from django.contrib.gis.gdal.libgdal import lgdal as ogr
 from django.contrib.gis.gdal import Driver, OGRGeometry, OGRGeomType, SpatialReference, check_err, CoordTransform
         self.geo_field = geo_field
         self.proj_transform = proj_transform
         self.mimetype = mimetype
-        self.file_name = file_name
+        self.file_name = smart_str(file_name)
 
     def __call__(self, *args, **kwargs):
         """