Skip to content

Commit a030bfc

Browse files
committed
Force unzipped body encoding to UTF-8
1 parent c4cf9c6 commit a030bfc

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)