print u'\u0D05'
a = '\u0D05'
print a
print a
gives \u0D05
as output but I want to print the unicode character it represents, which is അ
. How can I achieve this?
The \u
escape is not meaningful inside a non-unicode string. You need to do a = u'\u0D05'
.
If you're saying you're getting the string from somewhere else and need to interpret unicode escapes in it, then do print a.decode('unicode-escape')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With