Help Center/ Data Lake Insight/ FAQs/ DLI APIs/ How Can I Fix Garbled Chinese Characters Returned by an API?
Updated on 2024-11-15 GMT+08:00
How Can I Fix Garbled Chinese Characters Returned by an API?
When Chinese characters appear as garbled text in the API response, it is usually due to a mismatch in character encoding formats.
The results returned by DLI APIs are encoded in UTF-8. You need to convert the encoding format of the returned information to UTF-8.
The following example converts the encoding format of the returned response.content to UTF-8 to ensure that the Chinese characters are displayed properly.
print(response.content.decode("utf-8")) Parent topic: DLI APIs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot