How to conver unicode codes into normal text?

Question:

A REST API returns some text in this form:

            "text": "u0422u044eu043bu044eu043bu044eu043c-u0422u044eu043bu044eu043bu044eu043c"

I know what language the original text in. How to convert it into the normal form?

Asked By: duman

||

Answers:

So I encoded the text first using the encode function. This would return the value in the form of bytes. Then you can use the decode function to convert bytes to strings. Hope this is helpful.

https://i.stack.imgur.com/W9HUj.png