Conversion to Binary from Text or HTML

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Conversion to Binary from Text or HTML

Postby ConvertFromOldNGs » Fri Aug 07, 2009 3:00 pm

by Iain Kerr >> Wed, 22 Apr 2009 1:53:52 GMT

Hi
I need to convert a Text or HTML file to Binary has anyone done this successfully ? Do I need an external app or can it be done within Jade ?

Thanks

Iain

kerr.iain@yahoo.com.au

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Conversion to Binary from Text or HTML

Postby ConvertFromOldNGs » Fri Aug 07, 2009 3:00 pm

by Dean Cooper >> Wed, 22 Apr 2009 2:47:30 GMT

If you've read the contents of the file into a string, can you not just type cast the string to a binary? For example:

vars
fileStr : String;
fileBin : Binary;begin

... read the file into fileStr ...
fileBin := fileStr.Binary; // convert to binary
... rest of method ...
end;

Dean.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Conversion to Binary from Text or HTML

Postby ConvertFromOldNGs » Fri Aug 07, 2009 3:00 pm

by Iain Kerr >> Wed, 22 Apr 2009 3:10:07 GMT

Duh! I feel stupid


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 13 guests