The result from the Google+ API has \ufeff
appended to the end of every "content" result (I don't really know why?)
What is the best way to remove this unicode character from the json result? It is producing a '?'
in some of the output I am displaying.
Example:
https://developers.google.com/+/api/latest/activities/get#try-it
enter activity id
z12pvrsoaxqlw5imi22sdd35jwvkglj5204
and click Execute, result will be:
{
.....
"object": {
......
"content": "CONTENT OF GOOGLE PLUS POST HERE \ufeff",
......
example PHP code which shows a '?' where the '\ufeff' is:
<?php
$data = json_decode($result_from_google_plus_api, true);
echo $data['object']['content'];
// outputs "CONTENT OF GOOGLE PLUS POST HERE ?"
echo trim($data['object']['content']);
// outputs "CONTENT OF GOOGLE PLUS POST HERE ?"
Or am I going about this the wrong way? Should I be fixing the '?' issue rather than trying to remove the '\ufeff'
?