function to_unicode($string) {

$str = mb_convert_encoding($string, 'UCS-2', 'UTF-8');

$arrstr = str_split($str, 2);

$unistr = '';

foreach ($arrstr as $n) {

$dec = hexdec(bin2hex($n));

$unistr .= '&#' . $dec . ';';

}

return $unistr;

}

相关文章:

  • 2021-10-13
  • 2023-01-01
  • 2021-09-25
  • 2021-05-23
  • 2021-11-10
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2021-11-26
  • 2021-05-02
  • 2021-12-11
  • 2021-10-23
相关资源
相似解决方案