[tracker] SPARQL: Fix non-ASCII IRIs



commit c9f841e92f527b89f65c621aedd738175dd18267
Author: Jürg Billeter <j bitron ch>
Date:   Tue Jan 5 14:32:52 2010 +0100

    SPARQL: Fix non-ASCII IRIs

 src/libtracker-data/tracker-sparql-scanner.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-scanner.vala b/src/libtracker-data/tracker-sparql-scanner.vala
index f15491b..4fceb4f 100644
--- a/src/libtracker-data/tracker-sparql-scanner.vala
+++ b/src/libtracker-data/tracker-sparql-scanner.vala
@@ -525,11 +525,16 @@ public class Tracker.SparqlScanner : Object {
 				current++;
 				if (current < end) {
 					// check whether token is an IRI
-					while (current < end && current[0] > ' ') {
+					while (current < end && current[0] != '>') {
+						if (current[0] >= 0x00 && current[0] < 0x20) {
+							// control character, not an IRI
+							break;
+						}
 						switch (current[0]) {
 						case '<':
 						case '>':
 						case '"':
+						case ' ':
 						case '{':
 						case '}':
 						case '|':



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]