Home > Net >  Hex string into ascII string
Hex string into ascII string

Time:09-18

Hi,

I had a string of a string, I convert hex string, and escaped, and then how to turn back to ascII string

String sTemp=SRC;
String sMNO2="";
String sTemp2="";
String sItem="";
for (int i=0; i <=sTemp. Length - 1; I++)
{
STemp2="";
SItem=GetHexString ((int) (char. Parse (sTemp. Substring (I, 1))), ref sTemp2);
SMNO2 +=sItem. PadLeft (2, char. Parse (" 0 "));
}
StrTemp2=sMNO2;
//strTemp2 as hex string
//to escape, because some characters have different meanings to escape
StrTemp2=strTemp2. Replace (d02 "7", "7 e");
StrTemp2=strTemp2. Replace (" 7 d01 ", "7 d");

I now want to convert to string SRC enter such a character, if get, thank you,

  •  Tags:  
  • C #
  • Related