英文:
How to convert the following value in meaningful value in Flutter
问题
I'm getting a response from Flask API like this:
"நம்பிக்கை வைக்கும் பேசும் உறவு வைக்கும் அன்பு தான் கிடைக்கும்"
but when I pass it through Flutter, it shows like some ASCII representation like this:
"\u0ba8\u0b9f\u0bc1\u0ba8\u0bbf\u0bb2\u0bc8 \u0b85\u0ba9\u0bcd\u0baa\u0bbf\u0ba9\u0bcd".
I tried to convert it in frontend but I couldn't convert it as I expected.
英文:
I'm getting a response from Flask API like this
"நம்பிக்கை வைக்கும் பேசும் உறவு வைக்கும் அன்பு தான் கிடைக்கும்"
but when I pass it through the Flutter It shows like some ASCII representation like this
"\u0ba8\u0b9f\u0bc1\u0ba8\u0bbf\u0bb2\u0bc8 \u0b85\u0ba9\u0bcd\u0baa\u0bbf\u0ba9\u0bcd".
I tried to convert it in frontend but I couldn't convert it as I expected
答案1
得分: 1
以下是翻译好的部分:
"The response you are seeing is the Unicode escape sequence representation of Tamil characters.
You can convert them to their corresponding Tamil characters using the dart:convert
library:
String unicodeResponse = "\u0ba8\u0b9f\u0bc1\u0ba8\u0bbf\u0bb2\u0bc8 \u0b85\u0ba9\u0bcd\u0baa\u0bbf\u0ba9\u0bcd";
String decodedResponse = json.decode('"$unicodeResponse"');
decodedResponse
是您想要的有意义的值。"
英文:
The response you are seeing is the Unicode escape sequence representation of Tamil characters.
You can convert them to their corresponding Tamil characters using the dart:convert
library:
String unicodeResponse = "\u0ba8\u0b9f\u0bc1\u0ba8\u0bbf\u0bb2\u0bc8 \u0b85\u0ba9\u0bcd\u0baa\u0bbf\u0ba9\u0bcd";
String decodedResponse = json.decode('"$unicodeResponse"');
decodedResponse
is the meaningful value you want.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论