[OSM-dev] XAPI queries for tags that include a pipe, vbar or vertical bar
80n80n at gmail.com
Sun Dec 6 21:54:15 GMT 2009
On Sun, Dec 6, 2009 at 6:21 PM, David Calder <davidjcalder at gmail.com> wrote:
> I was wondering if you could help me. I'm using Tagwatch to find and tidy
> up the route_ref=* values where a pipe symbol or vbar (i.e. Unicode
> character U+007C) has been used as a delimeter. See this page for example:
> The query for a semicolon delimited value is (for example):
> which works fine.
> However, the query for a pipe delimited value is (for example):
> which returns the data for values that match 46 OR 46A but not "46|46A". I
> know that this is the correct functionality as defined in the API spec but
> how do I write the query so that it finds "46|46A". Do I need to escape the
> character (and if so, how?) or do I need to encode it somehow (and if so,
I've just added escaping for this this and other characters. To treat | as
a literal value escape it as \| so your query would be:
You can escape other characters [ ] = / etc in the same way.
Spaces normally don't need to be escaped but this depends to some extent on
the client you are using. If you do need to escape space then it's URL
encoding that you need, so use %20 in place of a space.
> Many thanks,
> dev mailing list
> dev at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev