Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule based symbology refine assistant forgets quotation marks for fields with special characters #15129

Closed
qgib opened this issue May 3, 2012 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented May 3, 2012

Author Name: Regis Haubourg (@haubourg)
Original Redmine Issue: 5536
Affected QGIS version: 1.7.4
Redmine category:symbology


Tested with Qgis 1.7.4 standalone and qgis 1.8.0.4 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?

Cheers
régis


@qgib
Copy link
Contributor Author

qgib commented May 3, 2012

Author Name: Giovanni Manghi (@gioman)


  • category_id was changed from Map Legend to Symbology
  • subject was 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

@qgib
Copy link
Contributor Author

qgib commented Jun 1, 2012

Author Name: Hugo Mercier (@mhugo)


Fixed (pull request: #156).

Double quotes are now added to field names. Field names are also escaped and can contain accents (tested with some french accents), spaces, as well as quotes and double quotes.

@qgib
Copy link
Contributor Author

qgib commented Jun 1, 2012

Author Name: Martin Dobias (@wonder-sk)


fixed in bf86521


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers labels May 24, 2019
@qgib qgib added this to the Version 1.8.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

1 participant