{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/43516303","id":43516303,"diff_hunk":"@@ -699,8 +693,14 @@ public void onClick(View v)\n       break;\n     case R.id.ll__place_wiki:\n       final String[] wikiParts = mTvWiki.getText().toString().split(\":\");\n-      if (wikiParts.length == 2)\n-        followUrl(\"https://\" + wikiParts[0] + \".wikipedia.org/wiki/\" + wikiParts[1]);\n+      try\n+      {\n+        if (wikiParts.length == 2)\n+          followUrl(\"https://\" + wikiParts[0] + \".wikipedia.org/wiki/\" + URLEncoder.encode(wikiParts[1].replace(' ', '_'), \"UTF-8\"));","path":"android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java","position":33,"original_position":33,"commit_id":"d09094d099ac318be5f72bdc476e81b589b8a120","original_commit_id":"d09094d099ac318be5f72bdc476e81b589b8a120","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"body":"Мне не нравится идея с дешифрованием урла на каждой платформе. Проще из ядра всегда возвращать полный дешифрованный урл, а в UI его либо полностью отображать, либо вырезать http префиксы, а еще лучше - всегда отображать слово Wikipedia или Read on Wikipedia, и по клику на это слово открывать/запускать полученный из ядра линк.","created_at":"2015-10-30T15:39:09Z","updated_at":"2015-10-30T15:39:09Z","html_url":"https://github.com/mapsme/omim/pull/421#discussion_r43516303","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/421","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/43516303"},"html":{"href":"https://github.com/mapsme/omim/pull/421#discussion_r43516303"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/421"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/421","id":49271504,"html_url":"https://github.com/mapsme/omim/pull/421","diff_url":"https://github.com/mapsme/omim/pull/421.diff","patch_url":"https://github.com/mapsme/omim/pull/421.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/421","number":421,"state":"open","locked":false,"title":"[generator] Replace wiki link with a shorter version","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"body":"Короче, делать url encode при записи названий вики-страниц было не очень хорошим решением. Каждая нелатинская буква вырастает в 6 раз, и название едва помещается в метаданные, где ограничение 255 символов. То есть, страницы с русским названием от 41 букв все обрезаны, почти всегда посередине полубуквы.\r\n\r\nЭтот пул-реквест меняет содержимое: вместо закодированной строки в `FMD_WIKIPEDIA` пишется строка как есть. Во-первых, её становится проще отображать, не нужно предобрабатывать. Во-вторых, для русских названий остаётся целых 125 букв.\r\n\r\nПроблема в том, что старые данные содержат поле в неправильном, закодированном формате. Если обновить приложение и не обновлять карты, большая часть названий статей будет отображаться, но ссылки работать не будут, т.к. `%` в них будут закодированы дважды. Я считаю, это не слишком большая проблема: для решения её достаточно обновить карты.\r\n\r\nК тому же, когда мы поправим ограничение на значения метаданных — а я надеюсь, что это к следующему релизу, — карты всё равно придётся перезагружать.","created_at":"2015-10-30T13:53:52Z","updated_at":"2015-10-30T15:39:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f09ba5880a7f6a6ec20711ff04c5833581b0289","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/421/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/421/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/421/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/d09094d099ac318be5f72bdc476e81b589b8a120","head":{"label":"Zverik:fix_wiki","ref":"fix_wiki","sha":"d09094d099ac318be5f72bdc476e81b589b8a120","user":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"repo":{"id":43427426,"name":"omim","full_name":"Zverik/omim","owner":{"login":"Zverik","id":766031,"avatar_url":"https://avatars.githubusercontent.com/u/766031?v=3","gravatar_id":"","url":"https://api.github.com/users/Zverik","html_url":"https://github.com/Zverik","followers_url":"https://api.github.com/users/Zverik/followers","following_url":"https://api.github.com/users/Zverik/following{/other_user}","gists_url":"https://api.github.com/users/Zverik/gists{/gist_id}","starred_url":"https://api.github.com/users/Zverik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zverik/subscriptions","organizations_url":"https://api.github.com/users/Zverik/orgs","repos_url":"https://api.github.com/users/Zverik/repos","events_url":"https://api.github.com/users/Zverik/events{/privacy}","received_events_url":"https://api.github.com/users/Zverik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zverik/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/Zverik/omim","forks_url":"https://api.github.com/repos/Zverik/omim/forks","keys_url":"https://api.github.com/repos/Zverik/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zverik/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zverik/omim/teams","hooks_url":"https://api.github.com/repos/Zverik/omim/hooks","issue_events_url":"https://api.github.com/repos/Zverik/omim/issues/events{/number}","events_url":"https://api.github.com/repos/Zverik/omim/events","assignees_url":"https://api.github.com/repos/Zverik/omim/assignees{/user}","branches_url":"https://api.github.com/repos/Zverik/omim/branches{/branch}","tags_url":"https://api.github.com/repos/Zverik/omim/tags","blobs_url":"https://api.github.com/repos/Zverik/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zverik/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zverik/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zverik/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zverik/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/Zverik/omim/languages","stargazers_url":"https://api.github.com/repos/Zverik/omim/stargazers","contributors_url":"https://api.github.com/repos/Zverik/omim/contributors","subscribers_url":"https://api.github.com/repos/Zverik/omim/subscribers","subscription_url":"https://api.github.com/repos/Zverik/omim/subscription","commits_url":"https://api.github.com/repos/Zverik/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zverik/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zverik/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zverik/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zverik/omim/contents/{+path}","compare_url":"https://api.github.com/repos/Zverik/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zverik/omim/merges","archive_url":"https://api.github.com/repos/Zverik/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zverik/omim/downloads","issues_url":"https://api.github.com/repos/Zverik/omim/issues{/number}","pulls_url":"https://api.github.com/repos/Zverik/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/Zverik/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/Zverik/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zverik/omim/labels{/name}","releases_url":"https://api.github.com/repos/Zverik/omim/releases{/id}","created_at":"2015-09-30T10:43:06Z","updated_at":"2015-09-30T10:45:15Z","pushed_at":"2015-10-30T13:45:46Z","git_url":"git://github.com/Zverik/omim.git","ssh_url":"git@github.com:Zverik/omim.git","clone_url":"https://github.com/Zverik/omim.git","svn_url":"https://github.com/Zverik/omim","homepage":null,"size":1800629,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"576103248f45a25aee46db83145fabca33c0224b","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","created_at":"2015-09-20T02:57:13Z","updated_at":"2015-10-30T05:17:00Z","pushed_at":"2015-10-30T15:35:30Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":1880695,"stargazers_count":1434,"watchers_count":1434,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":49,"forks":158,"open_issues":49,"watchers":1434,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/421"},"html":{"href":"https://github.com/mapsme/omim/pull/421"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/421"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/421/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/421/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/421/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/d09094d099ac318be5f72bdc476e81b589b8a120"}}}}