Editing binary files

Amedee Van Gasse amedee-ubuntu at amedee.be
Mon Jun 7 20:59:24 UTC 2010

On 07-06-10 11:56, Dotan Cohen wrote:
> On 7 June 2010 12:54, Dotan Cohen<dotancohen at gmail.com>  wrote:
>> Some binary files do contain plain text in them. In theory, is it
>> possible to edit this plain text in an editor such as VIM and then
>> expect the binary to run?
>> I am specifically asking about some convoluted file format that I
>> cannot upload an example of, but the user lost the original files to
>> make it yet the parts that he needs changed are visible as plaintext
>> when opening in VIM. Despite it not working and my insistence that it
>> shouldn't work, the user _insists_ that he has done this before.
>> What say you?
> Note that I am not talking about editing with a hex editor, apparently
> these binary files were in fact edited by Notepad++ in Windows
> sometime in the past. I do have reason to believe that the user is in
> fact right.
As long as the length of the strings isn't changed, and there is no 
funky CR/LF substitution, then yes, in theory it is possible. But so 
much horrible things could go wrong that you'd be better off with a hex 


More information about the ubuntu-users mailing list