WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
[resolved] JSON encode character encoding (7 posts)

  1. Maxaud
    Member
    Posted 1 year ago #

    Some text on a custom API call I have is returning characters encoded weird.

    examples:
    © = \u00a9
    - = \u2014
    sometimes spaces return an odd character string too.

    http://wordpress.org/extend/plugins/json-api/

  2. dphiffer
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Maxaud, I'm adding an option json_unescaped_unicode in the next release that will convert \u-escaped unicode characters to their unescaped equivalents.

  3. dphiffer
    Member
    Plugin Author

    Posted 1 year ago #

    Just released this in version 1.0.9.

  4. Maxaud
    Member
    Posted 1 year ago #

    That's awesome, thank you.

  5. wanula
    Member
    Posted 7 months ago #

    Hi,
    can you give an example of how to use this option?
    Thanks

  6. monkeypunch3
    Member
    Posted 7 months ago #

    Wanula,

    It's on the other notes page under the output modifying arguments section. I think setting json_unescaped_unicode to 1 in the query string will do it.

  7. pullyl
    Member
    Posted 4 months ago #

    Even with this option I am still seeing unicode in my output (i.e. –). Are there any other options that I should toggle to remove this? The call I am using is:
    http://www.easyasapplepie.com/?json=1&json_unescaped_unicode=1

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags