Last modified: 2014-10-05 04:06:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73648, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71648 - Some French characters break the Lyrics.wikia.com API
Some French characters break the Lyrics.wikia.com API
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-04 21:16 UTC by H.guillaume
Modified: 2014-10-05 04:06 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description H.guillaume 2014-10-04 21:16:37 UTC
Example: http://lyrics.wikia.com/api.php?action=lyrics&func=getSong&artist=MC%20Solaar&song=J%27Connais%20Mon%20R%C3%B4le

should return these lyrics: http://lyrics.wikia.com/MC_Solaar:J%27Connais_Mon_R%C3%B4le

..But it doesn't. Because the API returns a link to
http://lyrics.wikia.com/MC_Solaar:J%27Connais_Mon_R%C3%83%C2%B4le, my guess is that the "ô" character is at some point converted to "%C3%83%C2%B4" instead of "%C3%B4".

Cheers
Comment 1 Sam Reed (reedy) 2014-10-04 22:31:01 UTC
https://en.wikipedia.org/w/api.php?action=query&prop=info&titles=J%27Connais_Mon_R%C3%B4le

<?xml version="1.0"?>
<api>
  <query>
    <normalized>
      <n from="J&#039;Connais_Mon_Rôle" to="J&#039;Connais Mon Rôle" />
    </normalized>
    <pages>
      <page ns="0" title="J&#039;Connais Mon Rôle" missing="" contentmodel="wikitext" pagelanguage="en" />
    </pages>
  </query>
</api>



I'm presuming this really isn't a core MW bug. As you can see, on Wikipedia (at least), the input matches the output.


I've no idea what action=lyrics is. I'd suggest you file a bug with Wikia if you haven't already
Comment 2 Bawolff (Brian Wolff) 2014-10-05 04:06:42 UTC
> 
> ..But it doesn't. Because the API returns a link to
> http://lyrics.wikia.com/MC_Solaar:J%27Connais_Mon_R%C3%83%C2%B4le, my guess
> is that the "ô" character is at some point converted to "%C3%83%C2%B4"
> instead of "%C3%B4".
> 
> Cheers

Its treating the ô character as if it was iso 8859-1 and converting to UTF-8, however the text is already UTF-8 so in essence its double encoding ( %C3 is how you say à in UTF-8, where %C383 is how you say à in UTF-8. Similarly %B4 is how you say ´ in ISO 8859-1, but %C2%B4 is how you say ´ in UTF-8. Thus if the API module thinks %C3%B4 is in ISO 8859-1, then it will convert it to %C3%83%C2%B4)

Anyways, not a problem with the MediaWiki API. You need to file a bug with Wikia.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links