Additional fix for #249 - searching attributes with non-ascii characters.

git-svn-id: http://svn.osgeo.org/qgis/trunk@5763 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2006-09-06 13:02:51 +00:00
parent 7cff7dac9e
commit 29fe2fc6f0
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,9 @@
%option noyywrap
%option case-insensitive
// ensure that lexer will be 8-bit (and not just 7-bit)
%option 8bit
%{
#include <stdlib.h> // atof()

View File

@ -119,8 +119,8 @@ scalar_exp:
| '+' scalar_exp %prec UMINUS { $$ = $2; }
| '-' scalar_exp %prec UMINUS { $$ = $2; if ($$->type() == QgsSearchTreeNode::tNumber) $$->setNumber(- $$->number()); }
| NUMBER { $$ = new QgsSearchTreeNode($1); addToTmpNodes($$); }
| STRING { $$ = new QgsSearchTreeNode(yytext, 0); addToTmpNodes($$); }
| COLUMN_REF { $$ = new QgsSearchTreeNode(yytext, 1); addToTmpNodes($$); }
| STRING { $$ = new QgsSearchTreeNode(QString::fromUtf8(yytext), 0); addToTmpNodes($$); }
| COLUMN_REF { $$ = new QgsSearchTreeNode(QString::fromUtf8(yytext), 1); addToTmpNodes($$); }
;
%%