Skip to content

Commit

Permalink
Revert "Problems if the json-message contains special characters [...]"
Browse files Browse the repository at this point in the history
This reverts commit 7968aef.

As per the JSON specification in RFC 7159 section 8.1, "JSON text
SHALL be encoded in UTF-8, UTF-16, or UTF-32". [1]

It is therefore incorrect to apply utf8_encode() function to the data
received from the server since it is already in Unicode by definition.

Fixes #20350

[1] https://tools.ietf.org/html/rfc7159#section-8.1

Conflicts:
	core/json_api.php
	library/adodb
	library/disposable
	library/ezc/Base
	library/ezc/Graph
	library/phpmailer
  • Loading branch information
dregad committed Dec 8, 2015
1 parent 9e9433a commit 47c512f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/json_api.php
Expand Up @@ -41,7 +41,7 @@
*/
function json_url( $p_url, $p_member = null ) {
$t_data = url_get( $p_url );
$t_json = json_decode( utf8_encode( $t_data ) );
$t_json = json_decode( $t_data );

if( is_null( $p_member ) ) {
return $t_json;
Expand Down

0 comments on commit 47c512f

Please sign in to comment.