Skip to content

Commit 75dc85b

Browse files
committedAug 16, 2012
allow to ignore (OGR's interpretation of ) shape file encoding (might fix #5911)
1 parent b2f3214 commit 75dc85b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
 

‎src/app/qgsoptions.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
373373
cbxCreateRasterLegendIcons->setChecked( settings.value( "/qgis/createRasterLegendIcons", true ).toBool() );
374374
cbxCopyWKTGeomFromTable->setChecked( settings.value( "/qgis/copyGeometryAsWKT", true ).toBool() );
375375
leNullValue->setText( settings.value( "qgis/nullValue", "NULL" ).toString() );
376+
cbxIgnoreShapeEncoding->setChecked( settings.value( "/qgis/ignoreShapeEncoding", false ).toBool() );
376377

377378
cmbLegendDoubleClickAction->setCurrentIndex( settings.value( "/qgis/legendDoubleClickAction", 0 ).toInt() );
378379

@@ -810,6 +811,7 @@ void QgsOptions::saveOptions()
810811
cmbScanItemsInBrowser->itemData( cmbScanItemsInBrowser->currentIndex() ).toString() );
811812
settings.setValue( "/qgis/scanZipInBrowser",
812813
cmbScanZipInBrowser->itemData( cmbScanZipInBrowser->currentIndex() ).toString() );
814+
settings.setValue( "/qgis/ignoreShapeEncoding", cbxIgnoreShapeEncoding->isChecked() );
813815
settings.setValue( "/qgis/dockIdentifyResults", cbxIdentifyResultsDocked->isChecked() );
814816
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() );
815817
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() );

‎src/providers/ogr/qgsogrprovider.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
205205

206206
QgsApplication::registerOgrDrivers();
207207

208+
QSettings settings;
209+
CPLSetConfigOption( "SHAPE_ENCODING", settings.value( "/qgis/ignoreShapeEncoding", false ).toBool() ? "" : 0 );
210+
208211
// set the selection rectangle pointer to 0
209212
mSelectionRectangle = 0;
210213
// make connection to the data source

‎src/ui/qgsoptionsbase.ui

+7
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,13 @@
528528
</property>
529529
</widget>
530530
</item>
531+
<item>
532+
<widget class="QCheckBox" name="cbxIgnoreShapeEncoding">
533+
<property name="text">
534+
<string>Ignore shapefile encoding</string>
535+
</property>
536+
</widget>
537+
</item>
531538
<item>
532539
<layout class="QHBoxLayout" name="horizontalLayout_5">
533540
<item>

0 commit comments

Comments
 (0)