C# 代码有这么一段:

 byte[] bText = System.Text.Encoding.GetEncoding("gb2312").GetBytes(txtMsgValue.Text.Trim());
 string bbText = BitConverter.ToString(bText).Replace("-", "");

AS3 改写:

var bytes:ByteArray =new ByteArray();
 bytes.writeMultiByte(txtMsgValue.text,"gb2312");
 bytes.position=0;
 var bbText:String ="";
while(bytes.bytesAvailable) { bbText+=bytes.readUnsignedByte().toString(16); } bbText=bbText.replace(/-/g,"");//

 

相关文章:

  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-10-28
  • 2022-02-08
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-06-15
  • 2021-08-15
  • 2022-12-23
  • 2021-07-19
相关资源
相似解决方案