]> git.openstreetmap.org Git - nominatim.git/commitdiff
return a marginally better error message when query string is not in UTF-8,
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 12 Feb 2012 12:01:24 +0000 (12:01 +0000)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 12 Feb 2012 12:01:24 +0000 (12:01 +0000)
force UTF-8 in search formular

lib/template/search-html.php
website/search.php

index a9d328a8928f7b20ab0cad8aa60a30dfc685d0cf..09b7021f314458b9774213c5017555997175ef48 100644 (file)
@@ -317,7 +317,7 @@ form{
        <div id="seachheaderfade1"></div><div id="seachheaderfade2"></div><div id="seachheaderfade3"></div><div id="seachheaderfade4"></div>
 
        <div id="seachheader">
-               <form action="<?php echo CONST_Website_BaseURL; ?>search.php" method="get">
+               <form accept-charset="UTF-8" action="<?php echo CONST_Website_BaseURL; ?>search.php" method="get">
                        <table border="0" width="100%">
                                <tr>
                                        <td valign="center" style="width:30px;"><img src="images/logo.gif"></td>
index 37ddd23c4118c9885cfc54397745f4c7a270bc9a..f4b9b9248236de26b0ddc8e234d3a03d9862892a 100755 (executable)
                                $aPhrase = $oDB->getRow("select make_standard_name('".pg_escape_string($sPhrase)."') as string");
                                if (PEAR::isError($aPhrase))
                                {
-                                       var_dump($aPhrase);
+                                       echo "Illegal query string (not an UTF-8 string): ".$sPhrase;
+                                       if (CONST_Debug) var_dump($aPhrase);
                                        exit;
                                }
                                if (trim($aPhrase['string']))