Gavin Kistner
9/22/2006 9:12:00 PM
> puts %(encrypted text: #{cipher.inspect})
> ---------------------------------------------
> This is the result:
> "\214\t\303n\320Lz\330\271\252\017\355\036\251|\237\212V\270hq
> \267X\204\261\3327t\345\353\324\364"
> ---------------------------------------------
> what is that? \214????\t\303n?
irb(main):001:0> 140.chr
=> "\214"
irb(main):002:0> puts 140.chr
î
irb(main):003:0> 140.to_s( 8 )
=> "214"
The .inspect version of a string escapes non-ascii characters. \214 means "the character with the byte value of octal 214, decimal 140".
\t is a tab character.
Remove the .inspect from your above and you'll see something more like the python values you seem to have been expecting.