Skip to content

Commit b871d2f

Browse files
committed
Merge pull request #237 from jimmellor/master
Force unzipped body to UTF-8 encoding
2 parents b75aead + a030bfc commit b871d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/intercom/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def set_rate_limit_details(response)
105105

106106
def decode(content_encoding, body)
107107
return body if (!body) || body.empty? || content_encoding != 'gzip'
108-
Zlib::GzipReader.new(StringIO.new(body)).read
108+
Zlib::GzipReader.new(StringIO.new(body)).read.force_encoding("utf-8")
109109
end
110110

111111
def raise_errors_on_failure(res)

0 commit comments

Comments
 (0)