Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a program that creates a file that stores text like this:
application/octet-stream; charset=binary

now i need to convert this file to this:
text/plain; charset=us-ascii

i know this is possible because i use a simple windows program to make the conversion. I want to be able to make the conversion on the linux command line.

share|improve this question
2  
Not enough information is given to answer the question. Specifically what format is the file in -- what program did you use to create it? –  frabjous Oct 17 '11 at 18:27
2  
Was the 'simple conversion program' written by the same people who wrote the application creating the files? It probably knows the structure of the binary file and is therefore able to read it and then export a text file. Not knowing the structure can make it near impossible to write something that can read/convert it, since a binary file can pretty much be anything in any layout. –  Ƭᴇcʜιᴇ007 Oct 17 '11 at 18:41
    
if i do a cat filename, or od -c filename i can read some of the text but its not in the correct format. –  reyes Oct 17 '11 at 19:13
    
i do not know what format the file is in, and the program is custom so its not freely available. –  reyes Oct 17 '11 at 19:17
1  
Any chance of putting a before and after example on pastebin or something? We have no idea how the file is encoded or what is going on with the "decoder" program... –  Mokubai Oct 17 '11 at 19:53

1 Answer 1

use strings? Assuming there's plaintext in there somewhere, that will at least give you something to look at.

share|improve this answer
    
if i do a cat filename, or od -c filename i can read some of the text but its not in the correct format. –  reyes Oct 17 '11 at 19:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.