getsentry/raven-ruby — pull request #205 by huntrax11 (2014-09-05 15:04:47+00:00)
Title: Fix #174, over-sanitizing on non-ascii chars.

`Processor::Sanitizedata#clean_invalid_utf8_bytes` doesn't work as expected.
(Non-ascii characters was stripped out.)

```ruby
[1] pry(main)> s="한국, 中國, 日本(にっぽん) \255".force_encoding('UTF-8') # Korean, Chinese, Japanese
=> "한국, 中國, 日本(にっぽん) \xAD"
[2] pry(main)> s.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
=> ", , () "
[3] pry(main)> s.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
=> "한국, 中國, 日本(にっぽん) "
```