632
ToBinary
Description
Returns the binary representation of Base64 encoded data.
Category
Conversion functions
ToBinary(string_in_Base64 or binary_value)
Syntax
See also
See:
Parameters
Parameter
string_in_Base64 or
binary_value
Base64 provides 6 bit encoding of 8-bit ASCII characters. If you receive data in
Usage
Base64, you can re-create the actual binary object that it represents, such as a .gif,
.jpeg, or executable file, with the
Example
<!--- This example shows the use of ToBinary and ToBase64 --->
<html>
<head>
<title>
ToBinary Example
</title>
</head>
<BASEFONT FACE = "Arial, Helvetica" SIZE = 2>
<body bgcolor = "#FFFFD5">
<H3>ToBinary Example</H3>
<!--------------------------------------------------------------------
Initialize data.
---------------------------------------------------------------------->
<cfset charData = "">
<!--------------------------------------------------------------------
Create a string of all ASCII characters (32-255) and
concatenate them together.
---------------------------------------------------------------------->
<CFLOOP index = "data" from = "32" to = "255">
</CFLOOP>
for information about loading and reading binary data
cffile
for information about serializing and deserializing binary data
cfwddx
and
IsBinary
ToBase64
printable form
for determining the length of a binary object
Len
Description
String in Base64 to convert to binary or binary value to test to
ensure that it is an acceptable binary value.
<cfset ch = chr(data)>
<cfset charData = charData & ch>
for checking for binary data and converting it into
function.
ToBinary
Chapter 3 ColdFusion Functions
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?