Link to home
Start Free TrialLog in
Avatar of suhai
suhai

asked on

Convert file

hai..

can we convert the file which contains hex / character / base64 format into text format that can be read. Assume that i have this line of hex formated:

00 02 FF 0F 47 5F

after convert i got this text "Hello". Can we do that?

Thanks,

Suhaimi
Avatar of ozo
ozo
Flag of United States of America image

Are you sure that
00 02 FF 0F 47 5F
converts into "Hello"?  How did you convert it?
what format is this supposed to be?  hex, or character, or base64?
Avatar of Grailman
Grailman

"can we convert the file ... into text format that can be read"
I don't understand since this is how we read text files. Opening a file with the binary values 48 45 4C 4C 4F will give the text "HELLO". Do you mean you want to open a text file with the text "48 45 4C 4C 4F" and have it convert the three chars "48 " into one char "H"?

Avatar of suhai

ASKER

Yes grailman,  you've got my point. Do you have any program converter or some sample program?
while( scanf("%2x",&c)>0 ){ putchar(c); }
ASKER CERTIFIED SOLUTION
Avatar of Grailman
Grailman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of suhai

ASKER

Thanks.