Skip to content
Permalink
Browse files

Fix SHAPE_ENCODING argument should not always get escaped

  • Loading branch information
nyalldawson committed Feb 5, 2021
1 parent 55693d1 commit 9374300418ddaf04c014a1543e31da411d322e8a
@@ -260,7 +260,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
if len(shapeEncoding) > 0:
arguments.append('--config')
arguments.append('SHAPE_ENCODING')
arguments.append('"' + shapeEncoding + '"')
arguments.append(shapeEncoding)
arguments.append('-f')
arguments.append('PostgreSQL')
arguments.append('PG:' + self.getConnectionString(parameters, context))
@@ -646,7 +646,7 @@ def testOgr2PostGis(self):
alg.getConsoleCommands({'INPUT': source,
'SHAPE_ENCODING': 'blah'}, context, feedback),
['ogr2ogr',
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING "blah" -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" '
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING blah -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" '
'-lco DIM=2 ' + source + ' polys2 '
'-overwrite -lco GEOMETRY_NAME=geom -lco FID=id -nln public.polys2 -nlt PROMOTE_TO_MULTI'])

0 comments on commit 9374300

Please sign in to comment.