Questions tagged «encoding»




3
更改Shapefile数据源编码?
我试图通过属性更改唯一的shapefile数据源编码,以及如何将shapefile从LATIN1编码为UTF-8?但这并没有改变。 如果不保存QGIS项目,是否不能直接更改shapefile数据源编码? 我也尝试了这段代码,它显示了更改编码,但是当我再次打开shapefile时,它显示了相同的旧系统编码: for layer in QgsMapLayerRegistry.instance().mapLayers().values(): layer.setProviderEncoding(u'UTF-8') layer.dataProvider().setEncoding(u'UTF-8') print layer.name(), layer.dataProvider().encoding() (我不是保存QGIS项目,而是直接访问和保存shapefile。保存项目并执行此任务后,它将正常工作)
9 qgis  pyqgis  encoding 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.