From: Zangief Ief Date: 2008-03-09T10:11:28+09:00 Subject: bin2str conversion Hello, I would like to write a function which is able to convert a binary data into its string format... For example, here I have the opposite of my goal: str.unpack('c*').collect { |x| sprintf('%02x', x) }.to_s.hex.to_s(2) As you can see, this line can convert the string *str* to its binary format. Thanks for your help. Zhang' -- Posted via http://www.ruby-forum.com/.