Page MenuHomePhabricator

[BUG] Error trying to edit page 中國新歌聲_(第一季) in Simplified Chinese on API 23
Closed, InvalidPublic1 Story Points


There appears to be an encoding issue somewhere here and we're sending a malformed page title in the API request to fetch wikitext (it's truncated at the first paren):

Note that this doesn't happen for other languages (including Trad Chinese), or even other pages with in-title parens in Simplified Chinese...

Steps to reproduce

  1. Navigate to 中國新歌聲_(第一季)
  2. Click an edit button

Expected results

The editing activity opens

Actual results

An error is returned

Stack trace

10-13 14:46:36.464 3393-3393/ I/org.wikipedia.concurrency.SaneAsyncTask: 
  onPostExecute():71: java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONObject org.json.JSONArray.getJSONObject(int)' on a null object reference
    at org.wikipedia.editing.FetchSectionWikitextTask.processResult(
    at org.wikipedia.editing.FetchSectionWikitextTask.processResult(
    at org.wikipedia.ApiTask.performTask(
    at org.wikipedia.concurrency.SaneAsyncTask.doInBackground(
    at org.wikipedia.concurrency.SaneAsyncTask.doInBackground(
    at android.os.AsyncTask$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

Environments observed

App version: all
Android OS versions: all
Device model: all
Device language: all