1

Sometimes the fieldnames in the QGIS attribute table get corrupted, mostly it is å, ä, ö that is changed when the layer is opened in another software.

Is there any way to change them or is it only solution to create a new field and copy data to new field?

Yes shapefile, when I am opening the shapefile in ArcView3.2 I cant choose encoding and its get corrupted. There are somethings that is so much easier in ArcView so I am still using it.

enter image description here

enter image description here

Åke Eriksson
  • 495
  • 3
  • 9
  • What is your vector data container? Shapefile? https://gis.stackexchange.com/questions/75563/renaming-attributes-fields-in-shapefile-attribute-table-using-qgis – Comrade Che Sep 22 '22 at 09:39
  • QGIS doesn't have attribute tables, but can display the attributes tables of a dataset. What format is your data? Shapefile, geopackage, CSV, Tab, something else? Not all formats (and not all software) support non-ASCII field names. – user2856 Sep 22 '22 at 09:39
  • you probably have either saved the layer with the wrong encoding or read the shapefile with an encoding different than the one used to save it – Kalak Sep 22 '22 at 09:48
  • I suspect is an issue with encoding. As @LouisCottereau said you should check with what encoding the file has been saved. – Nikos Sep 22 '22 at 10:17
  • 1
    Rename fields tool does what you want, see https://gis.stackexchange.com/a/385939/15183 – til_b Sep 23 '22 at 10:33
  • But Rename fields tool doesn't change field names it creates a copy with a changed fieldname? – Åke Eriksson Sep 25 '22 at 09:28

1 Answers1

1

It's not clear in which case / with which software you encounter the problem.

In QGIS if you know the right encoding you may set it in the layer property : enter image description here

If you dont want to set it each time you may create another sidecar file with the .cpg extension (it's just a text file with for only content the encoding, for the shapefile in my exemple you will create the "DEMO.cpg" sidecar file with UTF-8 as only content)

I think QGIS create shapefile with UTF-8 encoding as default (you may change encoding be saving the shapefile using the "Save Vector Layer as..." and setting the encoding in the window)

Matt
  • 16,843
  • 3
  • 21
  • 52
J.R
  • 16,090
  • 1
  • 19
  • 52