rails/rails — pull request #4043 by cqpx (2011-12-20 04:54:40+00:00)
Title: don't encode an UTF-8 encoded template

After updated to 3.2.0.rc1, I find that Chinese characters in extracted source become unreadable.

The corresponding commit is
https://github.com/rails/rails/commit/13cab6ef50ab665e634f2834acbb0212300a3797
here is the problem line:

``` ruby
extract.encode! if extract.respond_to?(:encode!)
```
my template file is saved in utf-8,
before this line, ```extract.encoding``` returns ASCII-US
I guess the reason is ```extract.encode!``` convert all utf-8 encoded characters again using an ASCII-US->UTF-8 converter.
I'm new to ruby/rails, If I'm wrong, please correct me