I try to retrieve Cyrillic data from a database, but receive something like this “Ðез Ñеб не виждам пÑиÑина да живеє. I tried to set headers like this:
‘Content-Type’: ‘application/json’, ‘Accept-Charset’: ‘UTF-8’ but no success so far.
In the database, everything looks good.
How do you retrieve the data? I was not able to reproduce the issue in REST or via Codeless.
Please provide us with the logic you have.
Regards,
Marina
I am using Dart’s lib ‘package:http/http.dart’
Future doGet(String endpoint, [Map<String, dynamic>? queryParameters]) async {
return doGetWithUri(Uri.https(
baseUrl,
endpoint,
queryParameters,
));
}
Hello, @milen-dimitrovK5.
You need to decode your response with utf-8. Like this:
jsonDecode(utf8.decode(response.bodyBytes));
Regards, Nikita.
1 Like
OK, thanks. Yes, this fixed the issue.