For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > December 2006 > #39806 [Com]: JSON encoding in french









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #39806 [Com]: JSON encoding in french
stochnagara at hotmail dot com

2006-12-13, 4:11 pm

ID: 39806
Comment by: stochnagara at hotmail dot com
Reported By: philippe dot levan_nospam at kitpages dot fr
Status: Open
Bug Type: Documentation problem
Operating System: Windows/Linux
PHP Version: 5.2.0
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com