I have the following program:

  p Encoding.default_external
  File.open('testing', 'w') do |f|
    p f.external_encoding
  end

and when I run it I the following output:

  #<Encoding:UTF-8>
  nil

In other words, the file's "external encoding" is nil. What does this
mean? Shouldn't this be "UTF-8", the default external encoding?

BTW, "ruby1.9.1 -v" gives me:

  ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]

I'm using Ubuntu 10.04.1, and that's the most updated version of Ruby
1.9.1.

-- 
Posted via http://www.ruby-forum.com/.