Bug report #11201
New Shapefile and attribute table: QGIS allows illegal characters in attribute names
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Windows 7||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19512|
Some time ago I had to create a new shapefile with alot of attributes. I used comma (,), full stop (.) and slash (/) in some of the attribute names. These characters are apparently not meant to be used in attribute names (see e.g. http://support.esri.com/en/knowledgebase/techarticles/detail/23087 and http://forums.esri.com/Thread.asp?c=93&f=1149&t=279723). When I tried importing the shapefile created in QGIS in ArcMap I got an error message and the attribute table would not show up at all. I then manually removed the illegal characters and imported the shapefile again to ArcMap. Now it all went well with all attributes showing up correctly. The user should not be allowed/get a warning when using these special characters. It's interesting to see that QGIS has no problem with these characters.
#2 Updated by Andreas B about 6 years ago
Absolutely not. That was not my intention to imply. The only thing I thought may be worthwhile to look at is if you in QGIS are allowed to create attribute tables using characters which should be avoided. I do not know the Shapefile specs very well beyond the occasional googling, hence my supplied links. So if I'm incorrect, I apologize.
#4 Updated by Jukka Rahkonen almost 6 years ago
For helping to find right documents, yes, there is an official specification about shapefile format
When is comes to .dbf, shapefile spec refers to another specification:
"For more information on the dBASE file format, visit the INPRISE Corp. Web site at
www.inprise.com." That site is dead now and I do not know where to read the most relevant info but this is good starting point http://www.digitalpreservation.gov/formats/fdd/fdd000325.shtml.
There are several versions of dbf but because the shapefile spec is from year 1998 it makes no sense to read anything about dbf versions released after that date. This message from ESRI forum lists the major restrictions http://forums.esri.com/Thread.asp?c=9&f=85&t=62319
- limited to 10 characters
- the field name has to start with a character
- inside the name only characters, numbers and underscore are allowed
#7 Updated by Giovanni Manghi over 1 year ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR