1
0
mirror of https://github.com/django/django.git synced 2025-04-06 06:26:41 +00:00

[2.1.x] Fixed LayerMapping encoding in geodjango tutorial.

GDAL >= 1.9 automatically converts latin-1-encoded strings from Shapefiles to
UTF-8.
Backport of 388165ade4219aeefac1e231c1d44c51a7b62829 from master.
This commit is contained in:
Claude Paroz 2018-08-27 12:26:29 +02:00
parent 6cd16037d8
commit a24fc07bbc

View File

@ -457,10 +457,7 @@ with the following code::
)
def run(verbose=True):
lm = LayerMapping(
WorldBorder, world_shp, world_mapping,
transform=False, encoding='iso-8859-1',
)
lm = LayerMapping(WorldBorder, world_shp, world_mapping, transform=False)
lm.save(strict=True, verbose=verbose)
A few notes about what's going on: