php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64442 The character \u0092 is removed by json_decode
Submitted: 2013-03-17 15:57 UTC Modified: 2013-03-17 16:25 UTC
From: fabien dot arcellier at gmail dot com Assigned:
Status: Not a bug Package: JSON related
PHP Version: 5.3.23 OS: ubuntu
Private report: No CVE-ID: None
 [2013-03-17 15:57 UTC] fabien dot arcellier at gmail dot com
Description:
------------
When process json data, the character \u0092 is removed. In french it's an issue.

Test script:
---------------
<?php
$var = '{"id_musee":"179","presentation_francais":"Arch\u00e9ologie de l\u0092\u00e2ge du fer au Moyen \u00c2ge. C\u00e9ramiques grecques, \u00e9trusques, italiotes."}';
$copy = json_decode($var);

var_dump($copy);

// Result : { ["id_musee"]=> string(3) "179" ["presentation_francais"]=> string(90) "Archéologie de l’âge du fer au Moyen Âge. Céramiques grecques, étrusques, italiotes." }

// Expected : { ["id_musee"]=> string(3) "179" ["presentation_francais"]=> string(90) "Archéologie de l'’âge du fer au Moyen Âge. Céramiques grecques, étrusques, italiotes." }


?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-17 16:20 UTC] fabien dot arcellier at gmail dot com
-Status: Open +Status: Closed
 [2013-03-17 16:20 UTC] fabien dot arcellier at gmail dot com
It was a mistake from myself preparing the data. I shouldn't have u0092. No font 
represents this character.
You can close this bug report.

Regards
 [2013-03-17 16:25 UTC] rasmus@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 15 20:01:28 2019 UTC