This simple code show you the problem:
class MyObject
{
    var $publicString = "This is a weird character : é and it will trunk this sentence";
}
$myObject = new MyObject();
var_dump(json_encode($myObject));
The var_dump output is :
 string(47) "{"publicString":"This is a weird c开发者_如何学JAVAharacter : "}"
Why?
json_encode() expects UTF-8 data. 
I assume your file is ISO-8859-1 encoded. ISO-8859-1 é is an invalid character in UTF-8.
A workaround would be storing the file as UTF-8, or doing an iconv():
$myObject->publicString = 
     iconv("iso-8859-1", "utf-8//IGNORE", $myObject->publicString);
var_dump(json_encode($myObject));
json_encode() only works with UTF-8 char set. Here's a link to an example on how to deal with this issue. 
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论