@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | -if (! function_exists('mb_json_encode')) { |
|
| 75 | +if (!function_exists('mb_json_encode')) { |
|
| 76 | 76 | /** |
| 77 | 77 | * json_encode() for multibyte characters |
| 78 | 78 | * |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | * @return null|string |
| 82 | 82 | */ |
| 83 | 83 | function mb_json_encode($input) { |
| 84 | - return preg_replace_callback('/\\\\u([0-9a-zA-Z]{4})/', function ($matches) { |
|
| 85 | - return mb_convert_encoding(pack('H*',$matches[1]), 'UTF-8','UTF-16'); |
|
| 84 | + return preg_replace_callback('/\\\\u([0-9a-zA-Z]{4})/', function($matches) { |
|
| 85 | + return mb_convert_encoding(pack('H*', $matches[1]), 'UTF-8', 'UTF-16'); |
|
| 86 | 86 | }, |
| 87 | 87 | json_encode($input, JSON_UNESCAPED_UNICODE) |
| 88 | 88 | ); |