1

In Python3, how do I convert '\\u00A9 PNG' to '\u00A9 PNG' (or '© PNG')?

For Java, there is Apache Commons Lang to decode it.

I don't know how to do in Python3.

1 Answer 1

2

This should work for you.

string = '\\u00A9 PNG'
print (string.encode('utf8').decode('unicode-escape'))

output:

© PNG

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.