SpatialReference crashes when initialized with WKT containining unicode characters
from django.contrib.gis.db.backends.spatialite.models import SpatialiteSpatialRefSys as SpatialRefSys
from django.contrib.gis.gdal.srs import SpatialReference
SpatialReference(SpatialRefSys.objects.get(srid=187939).srtext)
/home/sergey/dev/django/django/contrib/gis/gdal/srs.py in __init__(self, srs_input, srs_type)
58 # Encoding to ASCII if unicode passed in.
59 if isinstance(srs_input, six.text_type):
---> 60 srs_input = srs_input.encode('ascii')
61 try:
62 # If SRID is a string, e.g., '4326', then make acceptable
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 34: ordinal not in range(128)
Change History
(5)
Owner: |
changed from nobody to Sergey Fedoseev
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Accepted
|
Summary: |
SpatialReference couldn't be initialized with WKT that contains unicode characters → SpatialReference crashes when initialized with WKT containining unicode characters
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR