Solved

How do I open hex file(as is, no conversion)  in Hex Workshop ?

Posted on 2014-02-20
17
518 Views
Last Modified: 2014-02-27
When I open .bin file in Hex Workshop, it opens as hex file.  That's exactly what I want.

When I open hex file, Hex Workshop takes it as ascii and converts to hex.  

How do I open the hex file as is ?
0
Comment
Question by:naseeam
  • 7
  • 4
  • 4
  • +2
17 Comments
 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 250 total points
Comment Utility
What do you mean by "hex" file?  And what exactly does the file contain?

At its most basic, a file is either binary or it is ASCII.  So which is yours?  What does it look like if you open it in NotePad?
0
 

Author Comment

by:naseeam
Comment Utility
It's a ascii file.  It looks as follows:

EC 29 0C 00 60 <...>
00 00 00 00 34 <...>
0
 

Author Comment

by:naseeam
Comment Utility
Again, it's a ascii file.  It looks as follows in notepad:

20 0C 00 60 00 80 00 00  < and so on >
00 00 00 00 00 00 00 00  < and so on >
< and so on >

When I open it in Hex Workshop, it looks as follows:
32 39 20 30 43 20 30 30
30 30 20 30 30 20 30 30

I want Hex Workshop to open ascii files exactly the way they are opened in notepad.
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 50 total points
Comment Utility
Hex Workshop looks at the byte values in the file.

If you have an ASCII file, it gives you the hexdecimal representation of the ASCII code of the characters in the file, because these are the values that it sees.

Why do you need to open the file in Hex Workshop, since you see the hexadecimal values in Notepad?
0
 
LVL 16

Expert Comment

by:HooKooDooKu
Comment Utility
So what you should see in Hex Workshop is the binary values of the ASCII text in the left side window and the ASCII text in the right side window.

So if you have a file that contains "EC 29 0C 00 60", you should see the following in HexWorkshop:

00000000|4543 2032 3920 3043 2030 3020 3630   |EC 29 0C 00 60


00000000 is the file offset
45 is the binary value of the ASCII character 'E'
43 is the binary value of the ASCII character 'C'
20 is the binary value of the ASCII character <Space>
32 is the binary value of the ASCII character '2'
39 is the binary value of the ASCII character '9'
etc.

I that's what you are seeing, then HexWorkshop isn't converting anything.  It's showing you the actual binary data that an ASCII file consists of.
0
 

Author Comment

by:naseeam
Comment Utility
>> Why do you need to open the file in Hex Workshop, since you see the hexadecimal values in Notepad?

I have two files.  A bin file and a ascii file.  I need to compare hexadecimal values in these two files.  I need to open both files in the same program so I can compare them.
0
 
LVL 16

Expert Comment

by:HooKooDooKu
Comment Utility
Hexworkshop isn't an ASCII file viewer.  If you want to only see ASCII, then open the file in Notepad.  Otherwise, the whole point of Hexworkshop is to display what a file looks like "in the raw".
0
 
LVL 16

Expert Comment

by:HooKooDooKu
Comment Utility
So what you really need is a file that can read your binary file and display it like your ASCII file.

In other words, you need a program to reformat you binary data file so that it looks like your ASCII file... or you need something that can read your ASCII file and reformat it as a binary file.

HexWorkshop doesn't do either of those... it is simply an editor that shows you the content of a binary file 'in the raw'.  As a bonus, it also attempts to display the contents of the binary file as a string of ASCII characters.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
Post the files - that way we can see what is in them and better answer the question.
0
 

Author Comment

by:naseeam
Comment Utility
>>  a program to reformat you binary data file so that it looks like your ASCII file
Yes, this is what I need and Hex Workshop shows hexadecimal values.

 >> you need something that can read your ASCII file and reformat it as a binary file.
No, I don't want this.  I don't want Hex Workshop to reformat ASCII to binary.  I want it to display hexadecimal values that are contained in my ascii file.
0
 

Author Comment

by:naseeam
Comment Utility
>> Post the files - that way we can see what is in them and better answer the question
I can't post them.  Their contents are as follows:

File 1 -  It only has bunch of hexadecimal values as follows:

EC 29 0C  < and so on >


Files 2 -  It's a binary file.
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
Why can't you post them - or even the first 20 bytes of each ?

Your description is not really helpful - as we would need to look at the contents to get a complete understanding.
0
 

Author Comment

by:naseeam
Comment Utility
Ascii files is as follows:

EC290C006000800000000000000000000000000000000000000000000000000000000000000000003400000114000421040840013A6000203AC8492116FD3F01F42180001479B6103AE83E1004F3FFDE150CC0DF150B00DF3A8839D8150300E044008000150580E0150400E0B42380000491861015000010B423C0000496C618B4238000049686101501001015000018B4238000049E861015000010B423C0000498C618B4238000049886101501001015000018B423400104924629B4230001



Bin file is as follows:

` €                                 4   !@:`  :ÈI!ý?ô!€ y¶:è>óÿÞ Àß  ß:ˆ9Ø àD € €à à´#€ ‘†  ´#À –Æ´#€ –†   ´#€ ž†  ´#À ˜Æ´#€ ˜†   ´#@’F)´# ’!´#À ’Æ´#€ ’†
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
Thanks  but can you rather post them as files. This is a text medium and information is lost if post directly to the page.
0
 

Author Comment

by:naseeam
Comment Utility
The files are proprietary.  They belong to a Company.
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
Ok, but you have posted part of them as text here already - if necessary we can mark this question as private. The problem with posting binary data in a text medium is that a lot gets lost in the translation.

Right now - based on the information submitted you have two files - one with binary data in it and one with text data in it. No matter that the text data is actually hex values the difference is that in the binary file the hex values you are seeing in your hex editor are the two characters for each byte in the .BIN file i.e. each character in the bin is being represented as a 2 char HEX value.

The other file appears to be text in which case each two characters represents 1 binary byte.

I am theorising here because we are unable to see the data in your files.

Question: is it not possible to take the two snippets you have posted above and place them in separate files and then upload those - i.e. not the whole file? We only need to see a couple of lines to be able to get an idea of what they contain.
0
 
LVL 26

Assisted Solution

by:skullnobrains
skullnobrains earned 200 total points
Comment Utility
export the binary file as text
http://www.hexworkshop.com/export_samples.html

then compare the 2 files in your favorite text editor

jedit with the jdiff plugin would be a good choice and will work on windows.
it has a hex plugin that probably an take care of the conversions as well.
notepad will be good enough if you know what you are looking for.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now