From: Daniel Waite Date: 2008-02-07T09:22:03+09:00 Subject: Re: Strange characters... how are they created? Todd Benson wrote: > I don't know anything about bittorrent, but > > s = '20:Ÿø\îµÊ^Ω¬ ‡m$æÉ* ú0*' > puts s.unpack('h*') > > might point you in the right direction. That's an interesting operation, but nay, no directional change. (Also, pasting it into IRB causes my machine to beep and pause. Dunno why though. Perhaps the characters being pasted mean something special to Ruby?) I asked a friend of mine and he said that if you dump the output of the digest method directly to a file, you'll get the funky output. My guess is console does some kind of conversion -- possibly with character encoding? Anywho, the following... require 'digest/sha1' output = File.open('output', 'w+') source = IO.read('./README_FOR_APP', 512) output << Digest::SHA1.digest(source) output.close Yields the same "style" output that Transmission generates. -- Posted via http://www.ruby-forum.com/.