]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
check if query is valid unicode string
[nominatim.git] / lib / Geocode.php
index b5f0c74f9612a1e01e943a277c6414f5f77dbb64..c99a4cf77b8e88d5b9356c3da95977e59980bb3a 100644 (file)
@@ -773,6 +773,9 @@ class Geocode
         }
 
         $sQuery = $this->sQuery;
+        if (!preg_match('//u', $sQuery)) {
+            userError("Query string is not UTF-8 encoded.");
+        }
 
         // Conflicts between US state abreviations and various words for 'the' in different languages
         if (isset($this->aLangPrefOrder['name:en'])) {