Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to parse content with special chars #76

Open
rhiaro opened this issue Mar 11, 2017 · 1 comment
Open

Failing to parse content with special chars #76

rhiaro opened this issue Mar 11, 2017 · 1 comment

Comments

@rhiaro
Copy link

rhiaro commented Mar 11, 2017

I'm using this with EasyRdf (@njh) and if I try to parse JSON-LD which contains unicode characters, it just halts, and I haven't managed to make it give me any errors yet. eg.

<?
$url = "https://linkedresearch.org/ldn/tests/inbox-compacted/changelog";
$response = file_get_contents($url);
var_dump($response);
echo "<hr/>";
$g = new EasyRdf_Graph($g);
$g->parse($response, 'jsonld');
var_dump($g->toRdfPhp());
?>

If you change $url to "https://linkedresearch.org/ldn/tests/inbox-compacted/announce", a JSON-LD document in otherwise the same format without any special characters, it works fine.

@lanthaler
Copy link
Owner

I don't know much about EasyRdf. Could you please check whether

echo JsonLD::toString(JsonLD::expand($url), true);

works? It works on my machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants