php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39806 JSON encoding in french
Submitted: 2006-12-12 10:52 UTC Modified: 2007-01-01 16:04 UTC
From: philippe dot levan_nospam at kitpages dot fr Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.2.0 OS: Windows/Linux
Private report: No CVE-ID: None
 [2006-12-12 10:52 UTC] philippe dot levan_nospam at kitpages dot fr
Description:
------------
json_encode stops when it finds an accent in the string

Reproduce code:
---------------
<?php
$title="nos succ?s";
$json = json_encode($title);
header("Content-type: plain/text");
echo "title=$title\n";
echo "json=$json\n";
?>

Expected result:
----------------
title=nos succ?s
json="nos succ?s"

Actual result:
--------------
title=nos succ?s
json="nos succ"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-12 11:05 UTC] tony2001@php.net
JSON supports only UTF8 strings.
Reclassified as docu problem.
 [2006-12-13 11:11 UTC] stochnagara at hotmail dot com
I think this is not only a documentation problem. The JSON encoder silently ignores the rest of the text. I think a warning should be raised because such problem cause a lot of debugging in order to find out that actually the JSON encoder cut the string to a certain place.
 [2007-01-01 16:04 UTC] didou@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of didou
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e1325b0b7d9e6462e2b91e9f96efa6b16530b657
Log: Fix bug #39806 and link to the JSON official site
 [2020-02-07 07:30 UTC] phpdocbot@php.net
Automatic comment on behalf of didou
Revision: http://git.php.net/?p=doc/base.git;a=commit;h=4597794d497646c1b609c6770fb93498c7649785
Log: Fix bug #39806 and link to the JSON official site
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Sep 08 21:00:01 2025 UTC