Issue #1965 has been updated by Yui NARUSE.

Status changed from Open to Closed

> Is there some setting to make the IO read all files using :encoding=>'utf-8' by default
Encoding.default_external gives the default.
Rails may use this and set as UTF-8, so you shouldn't change this.


following gives detailed information
http://yokolet.blogspot.com/2009/07/design-and-implementation-of-ruby-m17n.html
http://blog.grayproductions.net/articles/understanding_m17n
http://github.com/candlerb/string19/blob/361c7d9acf1745006fb3f35e94a1ee844d0bff07/string19.rb

> should the IO check the file encoding and auto set this before read it?
'EncDet' is the one, but this is not merged yet because of naming problem.

These are written in Japanese, but you can see candidates.
If you have good name, suggest it.
http://redmine.ruby-lang.org/issues/show/973
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/33628

Anyway if you know the encoding of a file, to specify explicitly is safest way.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1965

----------------------------------------
http://redmine.ruby-lang.org