RSS Forums RSS

Convert binary into text/text into binary

Please support our Pascal and Delphi advertiser: Programming Forums
Reply
Posts: 16
Reputation: Katrix36 is an unknown quantity at this point 
Solved Threads: 0
Katrix36 Katrix36 is offline Offline
Newbie Poster

Question Convert binary into text/text into binary

  #1  
Apr 24th, 2006
Hey all,

Would anyone be able to help me out with some code to convert text into binary / binary into text?

Your help would be much appriated.

Katrix36
AddThis Social Bookmark Button
Reply With Quote  
Posts: 12
Reputation: nvanevski is an unknown quantity at this point 
Solved Threads: 1
nvanevski nvanevski is offline Offline
Newbie Poster

Re: Convert binary into text/text into binary

  #2  
May 12th, 2006
It might seem strange to you, but text files are binary, too. It's the application that treats them differently. For example, if you change the extension from .txt to .bin, the application will not handle it the same.

If you are more precise in what you want to do, we might be able to help you better.
Reply With Quote  
Posts: 16
Reputation: Katrix36 is an unknown quantity at this point 
Solved Threads: 0
Katrix36 Katrix36 is offline Offline
Newbie Poster

Re: Convert binary into text/text into binary

  #3  
May 13th, 2006
Originally Posted by nvanevski
It might seem strange to you, but text files are binary, too. It's the application that treats them differently. For example, if you change the extension from .txt to .bin, the application will not handle it the same.

If you are more precise in what you want to do, we might be able to help you better.


To be more precise, I'm wanting a program that I can type some text into a textbox or memo, and then it displays that text in binary in another textbox/memo.
Reply With Quote  
Posts: 12
Reputation: nvanevski is an unknown quantity at this point 
Solved Threads: 1
nvanevski nvanevski is offline Offline
Newbie Poster

Re: Convert binary into text/text into binary

  #4  
May 13th, 2006
That should be pretty straightforward. On a click of a button, take the Text property into a String variable, then with one "for" loop walk the string, take every character, get the integer presentation using the Asc function, and display it in the other memo.
Reply With Quote  
Posts: 16
Reputation: Katrix36 is an unknown quantity at this point 
Solved Threads: 0
Katrix36 Katrix36 is offline Offline
Newbie Poster

Re: Convert binary into text/text into binary

  #5  
May 13th, 2006
thank you for youe help
Reply With Quote  
Reply

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



Similar Threads
Other Threads in the Pascal and Delphi Forum
Views: 28248 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:20 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC