function translate($str) { return html_entity_decode(preg_replace('/\\\\u([[:xdigit:]]+)/i', '&#x\\1;', $str)); }