RE: [PHP-WIN] covert binary data with php

From: Date: Fri, 13 May 2005 02:05:43 +0000
Subject: RE: [PHP-WIN] covert binary data with php
Groups: php.windows 
Request: Send a blank email to php-windows+get-26004@lists.php.net to get a copy of this message
Did you use the function ORD() for conversion? The function only convert the first byte into ASCII. If you want to convert multi-bytes, you should use UNPACK(). About the use of UNPACK(), you can link here: http://us4.php.net/manual/en/function.unpack.php Yong from Xerox,China 2005/5/13 -----Original Message----- From: Burkhard Herre [mailto:burk-man@gmx.de] Sent: Thursday, May 12, 2005 4:58 PM To: php-windows@lists.php.net Subject: [PHP-WIN] covert binary data with php hello i have a problem with reading binary data from a file. i read byte by byte with fread... now i want to convert the 1. byte in an ascii sign. and the next step is to read 2 bytes and convert the 2 bytes input into 1 sign in ascii...(16 bit) and so on. but php convert always 1 byte to 1 sign. thnak you -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#26004) next »