mimbert
Joined: 17/07/2013 17:29:19
Messages: 1
Offline
|
I received some errors with UK postal codes. For example with the following string: "B315bp".
Searching for the code as is returns no result:
http://api.geonames.org/postalCodeLookupJSON?postalcode=B315bp&country=GB&username=*
But searching with a space returns the expected result:
http://api.geonames.org/postalCodeLookupJSON?postalcode=B31%205bp&country=GB&username=*
While with Canada postal codes, which have the same format as UK ones, both will return a result:
http://api.geonames.org/postalCodeLookupJSON?postalcode=h2j2k6&country=CA&username=*
http://api.geonames.org/postalCodeLookupJSON?postalcode=h2j%202k6&country=CA&username=*
Of course I can inject a space in the string whenever I receive a UK postal code, but it seems inconsistent to me. Anyone else noticed this? How do you deal with it?
|