User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 422,977 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,933 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 3047 | Replies: 3
Reply
Join Date: Jul 2006
Posts: 4
Reputation: harish13 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
harish13 harish13 is offline Offline
Newbie Poster

Help converting a text or xml file into binary format

  #1  
Jul 18th, 2006
i want to convert a file from text format to binary format using VB how can i achieve this
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: converting a text or xml file into binary format

  #2  
Jul 18th, 2006
I don't know exactly what you mean.... do you want to convert every letter to it's binary equivalent, so that A would be 1000001 (65 Dec)? If that is the case, you need to understand that your file is going to be like, 8 times bigger than normal. The reason for that, is because every character is about 1 byte. So, the letter A is 1 byte, and the number 1 is 1 byte. The number 0 is 1 byte, and the letter z is 1 byte. The character # is 1 byte, and so is the © and Җ characters. Your text file is already in Binary format.... 1000001 in Binary would actually display the letter A. So, if you want the program to replace each instance of A with 1000001 in the text file.... it's going to be taking up 7 extra bytes to represent the letter A.... because 1 is 1 byte, 0 is 1 byte, and A is 1 byte.

If you are talking about having code in a text file, and wanting to make it an EXE, that's a different story.....
Reply With Quote  
Join Date: Jul 2006
Posts: 4
Reputation: harish13 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
harish13 harish13 is offline Offline
Newbie Poster

Re: converting a text or xml file into binary format

  #3  
Jul 18th, 2006
thank you for the reply.i got the solution.thank u
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: converting a text or xml file into binary format

  #4  
Jul 19th, 2006
Would you mind sharing, so the rest of the readers could get the same solution?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 3:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC