1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

force UTF-8 usage for responses decoding

This commit is contained in:
InsanusMokrassar 2019-04-26 10:34:32 +08:00
parent bed60720d3
commit 711410c426
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
some default library
* All proxy help methods was removed . They are will be replaced in separated project
* `Ktor` version `1.1.3` -> `1.1.4`
* Requests results now always decoding as `UTF-8`
## 0.13.0 Telegram Polls

View File

@ -60,7 +60,7 @@ class KtorRequestsExecutor(
if (call == null) {
throw IllegalArgumentException("Can't execute request: $request")
}
val content = call.response.content.toByteArray().toString(Charset.defaultCharset())
val content = call.response.content.toByteArray().toString(Charsets.UTF_8)
val responseObject = jsonFormatter.parse(
Response.serializer(request.resultSerializer()),
content