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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 40 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC