[Geocoding] support tab as space delimiter #967

K Rahul Reddy k_rahul_reddy at outlook.com
Fri Mar 20 16:06:43 UTC 2020


Hi all!

I am working on issue #967 
<https://github.com/openstreetmap/Nominatim/issues/967>. I have been 
asked to work on |/lib/Phrase.php 's| ||constructor

But I noticed that Phrase.php constructor does not receive %09-%13 
characters. They are somehow removed.

On further inspection, I found that this constructor is called by 
Geocode.php. The parameter passed itself does not have these characters. 
I found that

$sPhrase = $this->oDB->getOne(
                     'SELECT make_standard_name(:phrase)',
                     array(':phrase' => $sPhrase),
                     'Cannot normalize query string (is it a UTF-8 string?)'
                 );

in Geocode.php alters the $sPhrase and removes those characters. Should 
I go ahead and look into the the implementation further, or is there any 
other way?


PS: I initially planned to replace return function of getString function 
in ParameterParser.php with

return preg_replace('/[\x09|\x10|\x11|\x12|\x13]/', ' ', 
$this->aParams[$sName]);


Regards,

Rahul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/geocoding/attachments/20200320/d3869413/attachment.htm>


More information about the Geocoding mailing list