Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.8
-
None
-
CentOS Linux 7.3
Description
I compared the output from JSON_ARRAY () in mariaDB and json_encode () in php-5.6.31.
I have found that some of the Czech accent characters are not properly converted to number code (connection setting: SET NAMES UTF8):
$row = $this->database->query("SELECT JSON_ARRAY('1. ě 2. š 3. č 4. ř 5. ž 6. ý 7. á 8. í 9. é 10. ů 11. ú') AS json_data")->fetch(); |
|
$json_test = [
|
'mysql' => $row->json_data, |
'php' => json_encode('1. ě 2. š 3. č 4. ř 5. ž 6. ý 7. á 8. í 9. é 10. ů 11. ú'), |
];
|
|
die(var_dump($json_test));
|
|
|
And here is output:
array(2) { |
["mysql"]=> |
string(90) "["1. \u011B 2. \u0161 3. \u010D 4. \u0159 5. \u017E 6. ? 7. ? 8. ? 9. ? 10. \u016F 11. ?"]" |
["php"]=> |
string(113) ""1. \u011b 2. \u0161 3. \u010d 4. \u0159 5. \u017e 6. \u00fd 7. \u00e1 8. \u00ed 9. \u00e9 10. \u016f 11. \u00fa"" |
}
|
|
Attachments
Issue Links
- relates to
-
MDEV-23890 JSON_ARRAY utf8mb4 encoding error
- Open