Opened 8 years ago
Closed 5 years ago
#1748 closed defect (bug) (worksforme)
utf8 encoding for json outputs
Reported by: | dd32 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | 2nd-opinion |
Cc: |
Description
WordPress includes a wp_json_encode()
method for dealing with non-UTF8 strings before passing them to json_encode()
.
The standalone API handler doesn't have this available to it, and as such, doesn't handle JSON outputs for data containing non-utf8 data (which often occur within readme's and reviews).
I would suggest we should just borrow wp_json_encode()
and namespace it appropriately, or we could alternatively include a compat file for stand-alone instances when WordPress hasn't been included.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Does anyone have any examples of plugins whose JSON has invalid UTF8 characters?
Sorry for not including a link to one when I opened this ticket..