public function _encodeEntities($string)
    {
        $string = mb_convert_encoding($string, 'UTF-32', 'UTF-8');
        $t      = unpack("N*", $string);
        $t      = array_map(function ($n) {
            return "&#$n;";
        },
            $t);

        return implode("", $t);
    }