pack, unpack and little endian double values

From: Date: Sun, 05 Jan 2003 02:29:18 +0000
Subject: pack, unpack and little endian double values
Groups: php.general 
Request: Send a blank email to php-general+get-130295@lists.php.net to get a copy of this message
Hello I am trying to parse ESRI shape files, which have double values stored in little endian format. when i read these values using something like this: $RawFileHeader = fread($ShapeFile, 100); $FileHeader = unpack("NFileCode/N5Unused/NFileLength/VVersion/VShapeType/d8Box", $RawFileHeader); the double values seem garbled. Is there any way to force unpack() to read the doubles as little endians and convert the value accordingly? Thanks. Tim

« previous php.general (#130295) next »