Since PHP/5.4.0, there is an option called JSON_UNESCAPED_UNICODE
. Check it out:
https://php.net/function.json-encode
Therefore you should try:
json_encode( $text, JSON_UNESCAPED_UNICODE );
More Related Contents:
- PHP json encode – Malformed UTF-8 characters, possibly incorrectly encoded [duplicate]
- json_encode() non utf-8 strings?
- How to create this type of JSON data from PHP [closed]
- How to extract and access data from JSON with PHP?
- How to convert JSON string to array
- json_encode PHP array as JSON array not JSON object
- Facebook Graph API, how to get users email?
- php: loop through json array
- Merging two json in PHP
- php get values from json encode
- json_decode returns JSON_ERROR_SYNTAX but online formatter says the JSON is OK
- Best way to create an empty object in JSON with PHP?
- How to update/edit a JSON file using PHP [closed]
- decode a quoted printable message in php
- POST request with JSON body
- ‘Malformed UTF-8 characters, possibly incorrectly encoded’ in Laravel
- Handling big user IDs returned by FQL in PHP
- org.json.JSONException: Value
- Parse JSON string contents into PHP Array
- Invalid JSON parsing using PHP
- PHP convert XML to JSON group when there is one child
- How to build a JSON array from mysql database
- Handling data in a PHP JSON Object
- Get value from JSON array in PHP
- json parse error with double quotes
- json_encode not working with a html string as value
- Add new data into PHP JSON string
- json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT
- Laravel collection converts array to object
- Arabic Characters in JSON decoding [duplicate]