#39806 [Opn->Csd]: JSON encoding in french

From: Date: Mon, 01 Jan 2007 16:04:19 +0000
Subject: #39806 [Opn->Csd]: JSON encoding in french
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969374665@lists.php.net to get a copy of this message
ID: 39806 Updated by: didou@php.net Reported By: philippe dot levan_nospam at kitpages dot fr -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows/Linux PHP Version: 5.2.0 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2006-12-13 11:11:42] 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. ------------------------------------------------------------------------ [2006-12-12 11:05:20] tony2001@php.net JSON supports only UTF8 strings. Reclassified as docu problem. ------------------------------------------------------------------------ [2006-12-12 10:52:40] 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" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39806&edit=1

« previous php.doc (#969374665) next »