[wp-meta] [Making WordPress.org] #117: Credits API character set

Making WordPress.org noreply at wordpress.org
Wed Sep 9 18:20:36 UTC 2015


#117: Credits API  character set
---------------------+-------------------------------
  Reporter:  knutsp  |      Owner:
      Type:  defect  |     Status:  new
  Priority:  normal  |  Component:  api.wordpress.org
Resolution:          |   Keywords:  needs-patch
---------------------+-------------------------------

Comment (by coffee2code):

 The presumption in closing [https://core.trac.wordpress.org/ticket/17861
 #core17861] and moving discussion to this ticket has been that the Credits
 API is at fault. As a proper solution it could well be.

 However, there is a solution to the problem by patching core. Attached is
 [attachment:117.diff] which patches wp-admin/credits.php.

 The crux of the fix is that the Credits API applies `utf8_encode()` on
 user display_names sent via the API (see
 [https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits
 /wp-credits.php#L169 1],
 [https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits
 /wp-credits.php#L192 2],
 [https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits
 /wp-credits.php#L321 3]). So if wp-admin/credits.php simply does
 `utf8_decode()` on the string it receives, the proper characters are
 displayed (at least for the ones I tested).

 The easiest test is to apply the patch and view the credits for WP 4.3. In
 the props list, you should see `Bjørn Johansen`. Before the patch, that
 would appear as `Bjørn Johansen`. (He is also a translator for the locale
 nb_NO, and the fix applies to that section as well.)

 For the locale Norsk nynorsk (nn_NO), `Eivind Ødegard` correctly displays
 as `Eivind Ødegard`.

 I tried a few other locales with similar improvements.

 Please test and see if it resolves the character display issues you've
 seen with credits. If so, we might reopen #core17861 and close this.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/117#comment:12>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list