Bug report #5536
Rule based symbology refine assistant forgets quotation marks for fields with special characters
|Affected QGIS version:||1.7.4||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15129|
Tested with Qgis 1.7.4 standalone and qgis 126.96.36.199 from osgeow.
When trying to refine rules in rule based labeling interface, if field names contain spaces or non ascii characters, automatically generated rules queries do not include quotation mark for the field. See pictures attached and sample shapefile.
Ex: I get Montant re > '1000' instead of "Montant re" > 1000.
Map rendering is false but is rendered without any error message.
When testing each expression within the definition Query, error message raises "Filter expression parsing error:
syntax error, unexpected COLUMN_REF, expecting $end" . Putting quotation mark by hands gives a correct behaviour. Generating rules by hand, without using "refine" button does generate quotation marks.
- Possible other feature request : Newcoming users don't know that special characters is a bad pratice for fields names. Maybe a automatical clean in ogr export could be a good thing for shapefile at least.
- remark (not a bug): Another strange behaviour is that numerical values in range refining are quoted myfield > '1000' instead of Montant re > 1000. Could this affect performance since a type cast is necessary?
#1 Updated by Giovanni Manghi over 7 years ago
- Category changed from Map Legend to Symbology
- Subject changed from Rule based Labeling refine assistant forgets quotation marks for fields with special characters to Rule based symbology refine assistant forgets quotation marks for fields with special characters