rails/rails — Issue #3957: Result encoding is not obeyed on JRuby
Author: dnagir
Created: 2011-12-13 02:56:35+00:00
State: open

Here is a repro:

```bash
> rails g new jruby-encoding
> bundle exec rails g Blog name:string
> bundle exec rake db:migrate
```

Then add this as a functional test:

```ruby
test "should have configured encoding" do
get :index
# utf-8 != us-ascii
assert_equal Rails.application.config.encoding.downcase, response.body.encoding.name.downcase
end
```

It fails `<"utf-8"> expected but was <"us-ascii">`.

Here is the full the repo and test with full repro of the issue https://github.com/dnagir/jruby-encoding/blob/master/test/functional/blogs_controller_test.rb#L7