mapbox / mapbox/mapbox-java

Special character `á` incorrectly encoded in raw Geocoding API request URL

オープン
#979 コメント 6 件 リアクション 0 件 担当者 1 名 GitHub で見る

@osana がすでに取り組んでいます。

2019年4月18日 から。

主要言語
Java
スター
438
フォーク
117
PR マージ指標
30日以内にマージされた PR はありません

説明

What kind of issue is this?

  • Questions are better to ask on Stack Overflow. We are actively monitoring the questions there and oftentimes, others have already asked a similar question.
  • Feature request should start off by describing the problem the feature will resolve. Please open a GitHub ticket beforehand with information about the feature to spark some discussion about the topic and once you have our support.
  • Bug Report can be reported using the provided template below:
Expected Behavior

Using a geocoder with the Mapbox Maps SDK for Android should support special characters. So the search Santa Catarina Mártir,Puebla should yield results whether the Geocoding API call is initiated in a browser or via the Mapbox Maps SDK for Android.

Current Behavior

Expected results return when geocoding api request is initiated in a browser (i.e. in the Search Playground), but when using the SDK the raw geocoding API request URL includes the incorrect encoding for special character á so no results are returned.

Possible Solution
Steps to Reproduce
  1. Run your app (including a geocoder) in Android Studio and use this code to log out the raw geocoding API request URL:
Log.d("GeocodingActivity", "onResponse: call.request() = " + call.request());
  1. Enter the search "Santa Catarina Mártir,Puebla" and grab the geocoding API request URL.
  2. See that it doesn't return any results and the query contains incorrect encoding: https://api.mapbox.com/geocoding/v5/mapbox.places/Santa+Catarina+M%25C3%25A1rtir%252CPuebla.json?access_token={{access-token}}&country=mx%2Cmx&types=poi%2Caddress&language=en
  3. Compare to the same search with the same parameters in the Search Playground and the raw request: https://api.mapbox.com/geocoding/v5/mapbox.places/Santa%20Catarina%20M%C3%A1rtir%2C%20puebla.json?access_token={{access_token}}&cachebuster=1551922406234&autocomplete=false&country=mx&limit=1&language=en
Context (Environment)

using gradle, compiling the following versions:

    compile "com.mapbox.mapboxsdk:mapbox-sdk-services:4.5.0"
  compile "com.mapbox.mapboxsdk:mapbox-sdk-geojson:4.5.0"
Detailed Description
Possible Implementation

cc @langsmith

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。