From: warhero Date: 2007-03-08T00:44:37+09:00 Subject: reading unsigned byte I'm experiencing unexpected behavior when reading an byte.. as apposed to PHP which is returning expected results. this is how I'm reading the byte in ruby: int = somedata.unpack('c').first the result I'm getting in ruby is -127. In php I get 128. This is how I read it in php: int = ord(@this->raw_data($this->current_byte++]); not sure how to go about debugging this.. thanks -- Posted via http://www.ruby-forum.com/.