Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arabic / chinese script characters #4

Closed
svitiashchuk opened this issue Feb 4, 2021 · 0 comments
Closed

Allow arabic / chinese script characters #4

svitiashchuk opened this issue Feb 4, 2021 · 0 comments

Comments

@svitiashchuk
Copy link
Contributor

There are queries that are not considered as valid, but google/opencage geocoder allows to use it while geocoding. For example:

Chinese:

{
  "provider": "opencage",
  "address": "北京",
  "latlng": {
    "lat": 0,
    "lng": 0
  },
  "query": {
    "country": "cn"
  }
}

Arabic:

{
  "provider": "opencage",
  "address": "روات",
  "latlng": {
    "lat": 0,
    "lng": 0
  },
  "query": {
    "country": "pk"
  }
}

Such queries produces error.

{
  "error": "2 UNKNOWN: invalid query {Address:北京 Provider:opencage Lat:0 Lng:0 Query:map[country:cn]}"
}

It would be good if it is possible to geocode such addresses. Seems like regex validation should be tuned a little.

svitiashchuk added a commit to svitiashchuk/geocoder that referenced this issue Feb 4, 2021
Regular expression to check for language and mark characters in address text. Test
trntv added a commit that referenced this issue Feb 4, 2021
…ters-in-query

Ticket #4 Allow arabic / chinese script characters
@trntv trntv closed this as completed Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants