{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/26348","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/26348/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/26348/comments","events_url":"https://api.github.com/repos/rails/rails/issues/26348/events","html_url":"https://github.com/rails/rails/issues/26348","id":174376152,"number":26348,"title":"In production mode only, incompatible character encodings: ASCII-8BIT and UTF-8 on accented characters","user":{"login":"cenotaph","id":785941,"avatar_url":"https://avatars.githubusercontent.com/u/785941?v=3","gravatar_id":"","url":"https://api.github.com/users/cenotaph","html_url":"https://github.com/cenotaph","followers_url":"https://api.github.com/users/cenotaph/followers","following_url":"https://api.github.com/users/cenotaph/following{/other_user}","gists_url":"https://api.github.com/users/cenotaph/gists{/gist_id}","starred_url":"https://api.github.com/users/cenotaph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cenotaph/subscriptions","organizations_url":"https://api.github.com/users/cenotaph/orgs","repos_url":"https://api.github.com/users/cenotaph/repos","events_url":"https://api.github.com/users/cenotaph/events{/privacy}","received_events_url":"https://api.github.com/users/cenotaph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actionview","name":"actionview","color":"d7e102"},{"url":"https://api.github.com/repos/rails/rails/labels/PostgreSQL","name":"PostgreSQL","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-31T20:54:50Z","updated_at":"2016-08-31T22:51:49Z","closed_at":"2016-08-31T22:51:49Z","body":"When displaying content with accented characters such as ä or å, ActionView::Template::Error is raised with: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)\r\n\r\nThis ONLY happens in production mode and when behind a reverse proxy. Have tested with Passenger, Unicorn and Puma behind both nginx and apache.  Running the app in production mode on port 3000 and browsing to that works perfectly fine.\r\n\r\nALL content is in utf-8. The database (postgres using pg 0.18.4), nginx's charset setting, all of the encoding options in environment.rb, and the HTTP headers. Nothing should be in ASCII-8BIT.\r\n\r\nI am using ruby 2.3.1 and rails 5.0.0.1.\r\n\r\nIf anyone has an idea about this, or a workaround (short of appending .force-encoding('ASCII-8BIT') to every line in every view, please advise. I am extremely frustrated with it and beating my head off the table at this point.\r\n\r\nBuilding a service in Finland, so accented characters are absolutely necessary here!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/243926782","html_url":"https://github.com/rails/rails/issues/26348#issuecomment-243926782","issue_url":"https://api.github.com/repos/rails/rails/issues/26348","id":243926782,"user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T22:51:49Z","updated_at":"2016-08-31T22:51:49Z","body":"Unfortunately without any way to reproduce the issue I cannot keep this issue open. If you do determine that Rails *is* in fact the culprit, and are able to give us steps to reproduce, please ping me and I will reopen this issue. Thanks for your understanding. :)"}}
{"actor":{"display_login":"sgrif"}}