Hex to ascii conversion
how to convert 80-FF hex to ascii (extented Ascii).
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sivaraman DhamodaranRank #40 · 34.5K reputationPosted Nov 16, 2012, 3:04 AM EST
string hex_num = "80FF";
int code = Convert.ToInt32(hex_num, 16);
string converted = Encoding.Default.GetString(new byte[] { (byte)code } );
Prasant JinagaRank #2,383 · 594 reputationPosted Nov 16, 2012, 5:21 AM EST
Here is the code to convert Hexadecimal value to ascii code
for (int i = 0; i hexString.Length; i += 2) { string hs = hexString.Substring(i, 2); sb.Append(Convert.ToChar(Convert.ToUInt32(hs, 16))); } All the appended value will be in the text file. Thanks, Prasant