On this page

Show all

Help Center/ Data Lake Insight/ FAQs/ APIs/ What Can I Do If Chinese Characters Returned by an API Are Garbled Characters?

What Can I Do If Chinese Characters Returned by an API Are Garbled Characters?

Updated on 2023-03-21 GMT+08:00

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"))
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback