Skip to content

Conversation

haileys
Copy link

@haileys haileys commented Apr 3, 2012

I ran into an issue involving serializing a query string parameter as JSON. If there was a percent-encoded character above 127, json_encode would choke and simply serialize it as null.

I've changed the behaviour of json_escape_string to fall back to ASCII if its input isn't valid UTF-8. I've retained the warning it produces in this case.

@php-pulls
Copy link

Comment on behalf of laruence at php.net:

json shall be utf-8 string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants