{"action":"closed","issue":{"url":"https://api.github.com/repos/singlebrook/utf8-cleaner/issues/25","repository_url":"https://api.github.com/repos/singlebrook/utf8-cleaner","labels_url":"https://api.github.com/repos/singlebrook/utf8-cleaner/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/singlebrook/utf8-cleaner/issues/25/comments","events_url":"https://api.github.com/repos/singlebrook/utf8-cleaner/issues/25/events","html_url":"https://github.com/singlebrook/utf8-cleaner/issues/25","id":141352725,"number":25,"title":"Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT","user":{"login":"sainejob","id":377227,"avatar_url":"https://avatars.githubusercontent.com/u/377227?v=3","gravatar_id":"","url":"https://api.github.com/users/sainejob","html_url":"https://github.com/sainejob","followers_url":"https://api.github.com/users/sainejob/followers","following_url":"https://api.github.com/users/sainejob/following{/other_user}","gists_url":"https://api.github.com/users/sainejob/gists{/gist_id}","starred_url":"https://api.github.com/users/sainejob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sainejob/subscriptions","organizations_url":"https://api.github.com/users/sainejob/orgs","repos_url":"https://api.github.com/users/sainejob/repos","events_url":"https://api.github.com/users/sainejob/events{/privacy}","received_events_url":"https://api.github.com/users/sainejob/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-16T17:55:29Z","updated_at":"2016-03-21T21:01:42Z","closed_at":"2016-03-21T21:01:42Z","body":"We have a penetration testing service which berates our app with traffic intended to discover some vulnerabilities.  I've found that utf8-cleaner can prevent most of the exception we used to see but there is still an exception that is thrown very often.\r\n\r\n```\r\n…ctivesupport-4.0.13/lib/active_support/core_ext/uri.rb:   15:in `gsub'\r\n…ctivesupport-4.0.13/lib/active_support/core_ext/uri.rb:   15:in `unescape'\r\n                /usr/local/lib/ruby/2.2.0/uri/common.rb:  125:in `unescape'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/uri_string.rb:   88:in `valid_uri_encoded_utf8'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/uri_string.rb:   23:in `valid?'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/uri_string.rb:   15:in `cleaned'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/middleware.rb:   56:in `cleaned_string'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/middleware.rb:   44:in `sanitize_env_rack_input'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/middleware.rb:   30:in `sanitize_env'\r\n…gems/utf8-cleaner-0.2.1/lib/utf8-cleaner/middleware.rb:   21:in `call'\r\n```\r\n\r\nI've found this article which talks about many things including this error:\r\nhttp://yehudakatz.com/2010/05/05/ruby-1-9-encodings-a-primer-and-the-solution-for-rails/\r\n\r\nI'm wondering if there is anything that utf8-cleaner could do to prevent this particular exception.\r\n\r\nYou guys have any further insight on the subject? Thanks!\r\n"}}