Skip to content

Commit a6a5c5b

Browse files
author
wonder
committed
Additional fix for #249 - searching attributes with non-ascii characters.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5763 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f4a3dd3 commit a6a5c5b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/core/qgssearchstringlexer.ll

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
%option noyywrap
2121
%option case-insensitive
2222

23+
// ensure that lexer will be 8-bit (and not just 7-bit)
24+
%option 8bit
25+
2326
%{
2427

2528
#include <stdlib.h> // atof()

src/core/qgssearchstringparser.yy

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ scalar_exp:
119119
| '+' scalar_exp %prec UMINUS { $$ = $2; }
120120
| '-' scalar_exp %prec UMINUS { $$ = $2; if ($$->type() == QgsSearchTreeNode::tNumber) $$->setNumber(- $$->number()); }
121121
| NUMBER { $$ = new QgsSearchTreeNode($1); addToTmpNodes($$); }
122-
| STRING { $$ = new QgsSearchTreeNode(yytext, 0); addToTmpNodes($$); }
123-
| COLUMN_REF { $$ = new QgsSearchTreeNode(yytext, 1); addToTmpNodes($$); }
122+
| STRING { $$ = new QgsSearchTreeNode(QString::fromUtf8(yytext), 0); addToTmpNodes($$); }
123+
| COLUMN_REF { $$ = new QgsSearchTreeNode(QString::fromUtf8(yytext), 1); addToTmpNodes($$); }
124124
;
125125

126126
%%

0 commit comments

Comments
 (0)