> Having 
> said that, strings with backslash-escapes like that will probably get 
> ASCII-8BIT by default.

P.S: to check this you must actually write and run a standalone program 
file. irb is not a good predictor of behaviour, nor is piping a program 
to ruby on stdin.

$ irb19 --simple-prompt
>> "\xff".encoding
=> #<Encoding:UTF-8>
>> ^D

$ ruby19
p "\xff".encoding
^D
#<Encoding:UTF-8>

$ cat >test.rb
p "\xff".encoding
^D
$ ruby19 test.rb
#<Encoding:ASCII-8BIT>
$

This is with:

$ ruby19 -v
ruby 1.9.2dev (2009-07-18 trunk 24186) [i686-linux]

compiled from source under Ubuntu Jaunty.
-- 
Posted via http://www.ruby-forum.com/.