From b0f0b0084ee6a6e6fcc230cc244f841c3d1ccaf9 Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 11 Oct 2023 13:56:51 -0600 Subject: [PATCH] Decode json content as utf8 --- lib/logic/common/http_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logic/common/http_client.dart b/lib/logic/common/http_client.dart index c4b228ff..676dfb23 100644 --- a/lib/logic/common/http_client.dart +++ b/lib/logic/common/http_client.dart @@ -94,7 +94,7 @@ class ServiceResult { ServiceResult(this.response, R Function(Map) parser) { if (StringUtils.isNotEmpty(response.body) && response.success) { try { - content = parser.call(jsonDecode(response.body!)); + content = parser.call(jsonDecode(utf8.decode(response.raw!.bodyBytes))); } on FormatException catch (e) { dev.log('ParseError: ${e.message}'); }