You have the order right.  binarydecode converts hex to binary and
binaryencode does the opposite.  I used to get these confused also but you
are 'decoding' the hexadecimal string into its binary form and you are
'encoding' a binary into a specific form (in this case hexadecimal).

Jason Cronk




                                                                                
                                                        
                      "Adam Cameron"                                            
                                                        
                      <[EMAIL PROTECTED]        To:       [email protected]    
                                                        
                      active.com>               cc:                             
                                                        
                      Sent by:                  Subject:  RE: [CFCDev] 
BinaryDecode issue                                               
                      [EMAIL PROTECTED]                                         
                                                       
                      ne.org                                                    
                                                        
                                                                                
                                                        
                                                                                
                                                        
                      12/01/2005 09:04                                          
                                                        
                      AM                                                        
                                                        
                      Please respond to                                         
                                                        
                      CFCDev                                                    
                                                        
                                                                                
                                                        
                                                                                
                                                        




Duh, sorry: didn't pay attention to the order of the functions being
called.  Obviously I was lucky the second of my examples didn't just error!

(actually... Why DIDN'T it just error??)
--
Adam

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Adam Cameron
Sent: 01 December 2005 13:55
To: [email protected]
Subject: RE: [CFCDev] BinaryDecode issue

Yep, I get the same.

And similar experience with
<cfoutput>#binaryencode(binarydecode('ABCDE','HEX'),'HEX')#</cfoutput>
And
<cfoutput>#binaryencode(binarydecode('ABCDEFG','HEX'),'HEX')#</cfoutput>

Interesting.

--
Adam

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: 01 December 2005 13:32
To: [email protected]
Subject: [CFCDev] BinaryDecode issue

Can anybody duplicate this problem on CF7?

#binaryencode(binarydecode('ABC','HEX'),'HEX')#

It should output ABC but it only gives me AB.
Binarydecode appears to lose the last character.

Jason Cronk




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of
the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of
the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of
the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]









----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to