Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-15-2004, 02:27 PM
savkin savkin is online now
Registered User
 
Join Date: 09-15-2004
Posts: 2
Replace in binary file problem

It looks like I've found a bug in Visual Build 5.2 - 5.5 versions.

I'm using "Replace in File" step to serach and replace a text string in a binary file (for example notepad.exe from WINNT folder). If string exists Visual Build erases entire file, so after this step file's size is only 8 bytes.

Version 4.6b worked fine with binary files.

Is there a way to fix it or any workaround?

Thanks,
Slava
Reply With Quote
  #2  
Old 09-15-2004, 02:45 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
It's not a bug, as the Replace in File action is only intended for replacing text in text files. If it ever did work for binary files it was only incidental. Most likely the reason it no longer works is that VBP (as of 5.0) is a Unicode app, and the file contents are converted from the specified code page / encoding to Unicode, processed internally as a Unicode string, and converted back to the specified code page when writing the changes back out. This is necessary to properly support Unicode, but obviously won't work for non-text files.

We'll consider adding support for binary file search and replacement in a future release. For now, you can use a tool such as XVI [1] that is designed to support replacements in binary files and provides a command-line interface for automating it.

[1] http://www.chmaas.handshake.de/delph...vi32/xvi32.htm
Reply With Quote
  #3  
Old 09-15-2004, 02:58 PM
savkin savkin is online now
Registered User
 
Join Date: 09-15-2004
Posts: 2
Thanks for the quick reply!

It would be so nice if you added binary files support in a future release. It's really necessary. Until then I'll have to use an external utility for this purpose.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:54 PM.


Copyright © 1999-2023 Kinook Software, Inc.