From: lucsky@... (Luc Heinrich) Date: 2003-08-16T02:33:31+09:00 Subject: Forcing endianness when packing signed values Greetings, Why is it possible to pack unsigned short and int values in little-endian byte order (using the 'v' and 'V' formats) and not signed values ? [ 42].pack("v").unpack("v")[0] # => 42 [-42].pack("v").unpack("v")[0] # => 65494 So I have to use stuff like [-42].pack("v").unpack("v")[0] - 65536 # => -42 Not a showstopper, but not so nice either... :) -- Luc Heinrich - lucsky@mac.com