How can we change encoding mode for the whole project rather than doing to single shapefiles in QGIS 3.4?
I wanted to change "UTF-8"
to "Shift_JIS"
to all project vector files.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityHow can we change encoding mode for the whole project rather than doing to single shapefiles in QGIS 3.4?
I wanted to change "UTF-8"
to "Shift_JIS"
to all project vector files.
you can use a python script for that task:
group = QgsProject.instance().layerTreeRoot().children()
layers = [ item.layer() for item in group ] #list of all layers
for layer in layers:
layer.setProviderEncoding('Shift_JIS')
layer.dataProvider().setEncoding('Shift_JIS')
save the script to a file.py and open it from the Python console->Editor