Re: CF equivalent to PHP pack() function

2008-11-02 Thread Dave Watts
and this isn't a CF equivalent, it's a javascript equivalent. That's not JavaScript, it's Java, which can be run from within a CF page with a bit of effort. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction

Re: CF equivalent to PHP pack() function

2008-11-01 Thread Alexey Passichenko
Hi all! I've found a java equivalent to PHP pack('H*', function Here it is: code String myHexStr = D0A0D0B0D0B7D0BCD0B5D180D18B; //some string in Russian, charset UTF-8 byte [] b = new BigInteger(parNameHex, 16).toByteArray(); //maybe other constructor to implement other formats of pack()

Re: CF equivalent to PHP pack() function

2008-11-01 Thread Phillip M. Vector
So.. This being a CF list... What does PHP pack do? and this isn't a CF equivalent, it's a javascript equivalent. Alexey Passichenko wrote: Hi all! I've found a java equivalent to PHP pack('H*', function Here it is: code String myHexStr = D0A0D0B0D0B7D0BCD0B5D180D18B; //some string in

Re: CF equivalent to PHP pack() function

2008-11-01 Thread s. isaac dealey
So.. This being a CF list... What does PHP pack do? and this isn't a CF equivalent, it's a javascript equivalent. In PHP Pack() is a complicated way of doing the equivalent of this in CF: toBinary(toBase64(my string)) What's added by pack() beyond that CF example is a bunch of formatting

Re: CF equivalent to PHP pack() function

2007-09-27 Thread Daniel Smith
Thank you for your responses, I'll give Corfield's tag a shot. If that doesn't work, I'll post my attempt at re-writing the Perl example. Thanks again guys. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and

Re: CF equivalent to PHP pack() function

2007-09-26 Thread James Holmes
There's no direct equivalent in CF; there isn't even a direct equivalent in Java (as far as I can see). It seems you'll have to write one - perhaps crack open the source for that function in PHP (or the original form in Perl). On 9/27/07, Daniel Smith [EMAIL PROTECTED] wrote: In PHP there is a

Re: CF equivalent to PHP pack() function

2007-09-26 Thread Barney Boisvert
Sean Corfield (www.corfield.org) has a custom tag that uses a Java-based PHP implementation (can't remember the name) to allow execution of inline PHP code from CF templates. I don't know if they implement the pack() function, but I'd think it likely. If they do, you could use that to get your

Re: CF equivalent to PHP pack() function

2007-09-26 Thread James Holmes
Oh, yes, that's possibly a way around it, although as you say it's rather like using nukes to rid yourself of an ant problem. Quercus is the package and I've been playing with it - it's only useful in CF8 as it depends on Java 6. On 9/27/07, Barney Boisvert [EMAIL PROTECTED] wrote: Sean Corfield

RE: CF equivalent to PHP pack() function

2007-09-26 Thread Ryan, Terrence
I had to simulate pack(L) from perl. I don't know if this will help, but I figured I would share it. /* create_perl_packed_string_L This simulates the command pack (L, $now) function from perl. It converts a number from numerals into the asci character