Nano HE
Nano HE

Reputation: 9307

How can I convert Special Format String to Text?

How can I convert the string 00 00 EF 01 00 00 00 00 00 00 to text?

I googled and found a online tool which can convert binary to text only.

Upvotes: 1

Views: 220

Answers (3)

Brett
Brett

Reputation: 1550

I'm assuming here the text you've supplied is "as is", with spaces separating the hex digit pairs.

You can convert each hex value with, e.g.:

byte.Parse("EF", System.Globalization.NumberStyles.AllowHexSpecifier)

So you can convert the whole to a byte array:

var byteArray = "0A 0A 0A".Split(' ').Select(s => byte.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier)).ToArray();

However, you don't specify what character encoding your hex stream represents. Once you've got your byte array, you'll need to convert it as necessary.

Upvotes: 1

Tarlog
Tarlog

Reputation: 10154

I created a tool few years ago that can convert/encode strings. Hope you'll find it useful.

Upvotes: 1

Dani
Dani

Reputation: 15069

This values are in HEX - This tool does hex as well, you can always transalte HEX to decimal and then take their ASCII value...

Upvotes: 1

Related Questions