|
-
May 25th, 2006, 09:13 AM
#1
Converting Binary Data to ASCII
Hello I am working on a C# application that is to read a file with binary data (in format of 00 A0 B2 E0 23 and so on and so forth, the file is multiple lines as well). I need the data to be read in and then from each group I need that value converted to its ASCII value (like 00 should produce 0 and 65 should produce A). Once I have a string of the corresponding ASCII characters I will be in good shape. I have been running around on this and am having no luck. Tried using Binaryreader and that takes each digit, don't want that.
Thanks for any help!!
-
May 25th, 2006, 09:28 AM
#2
Re: Converting Binary Data to ASCII
Did you try any one of the encoding classes?
Try
System.Text.Encoding.ASCII.GetString(bytes); method..
If that doesn't work, it should most prob. be the encoding problem. Try different encoding classes (Encoding)
Start with "1252 Windows-1252 Western European (Windows) "
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|