1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-04 15:49:41 +00:00

force UTF-8 usage for responses decoding

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

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