Skip to content

Commit

Permalink
Change String#encode call to not force from 'binary. Fix #226
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon de Andres committed Apr 2, 2015
1 parent a309a19 commit c71a0b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def enforce_valid_utf8(payload)
value = object.to_s

if value.respond_to? :encode
encoded_value = value.encode('UTF-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '')
encoded_value = value.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
else
encoded_value = ::Iconv.conv('UTF-8//IGNORE', 'UTF-8', value)
end
Expand Down

0 comments on commit c71a0b1

Please sign in to comment.