DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Pascal and Delphi (http://www.daniweb.com/forums/forum124.html)
-   -   Convert binary into text/text into binary (http://www.daniweb.com/forums/thread44006.html)

Katrix36 Apr 24th, 2006 2:57 pm
Convert binary into text/text into binary
 
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

nvanevski May 12th, 2006 5:21 pm
Re: Convert binary into text/text into binary
 
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.

Katrix36 May 13th, 2006 10:36 am
Re: Convert binary into text/text into binary
 
Quote:

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.

nvanevski May 13th, 2006 2:47 pm
Re: Convert binary into text/text into binary
 
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.

Katrix36 May 13th, 2006 6:01 pm
Re: Convert binary into text/text into binary
 
thank you for youe help


All times are GMT -4. The time now is 3:44 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC