views:

81

answers:

1

Hello I'm getting a bunch of weird html output in users messages

e.g.

\u0644\u064a\u0646\u0643 \u0627\u0644 \u0639\u0627\u0645\u0644

I assume their aribic characters decoded?

How can I perhaps preg replace all these codes with something a little more useful? because search results are filled with pages and pages of this stuff

Perhaps even display them as they're supposed to be?

Any advice what to do with such strings and how to implement them appreciated..

Please keep in mind this stuff is mixed in been common language letters / numbers

many thanks

+5  A: 

These are JSON encoded characters

echo json_decode('"\u0644\u064a\u0646\u0643 \u0627\u0644 \u0639\u0627\u0645\u0644"');

Outputs : لينك ال عامل

Serty Oan