Skip to content

Commit 304b0fd

Browse files
Force response encoding to UTF-8 to avoid issues with older versions of requests package
1 parent 35fd332 commit 304b0fd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Deprecated
1313
### Removed
1414
### Fixed
15+
* Force response encoding to UTF-8 to avoid issues with older versions of requests package.
1516
### Security
1617

1718

deepl/http_client.py

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def request(
134134
with self._session.request(
135135
method, url, data=data, timeout=timeout, **kwargs
136136
) as response:
137+
response.encoding = "UTF-8"
137138
return response.status_code, response.text
138139

139140
except (

0 commit comments

Comments
 (0)