1 $chs='你好'
 2 
 3 function converToUft8($str){
 4 
 5 $bs=[System.Text.Encoding]::Default.GetBytes($str);
 6 
 7 $u8Char=[System.Text.UTF8Encoding]::UTF8.GetString($bs);
 8 return $u8Char;
 9 
10 }
11 
12 $enCode= converToUft8($chs)
13 echo $enCode

 

相关文章:

  • 2022-03-04
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2021-07-17
相关资源
相似解决方案