etayluz
etayluz

Reputation: 16436

Python: convert unicode string to corresponding Unicode character

How do I convert a unicode string '05d1' to corresponding Unicode character '\u05d1' in python?

Upvotes: 2

Views: 146

Answers (1)

wim
wim

Reputation: 363456

Convert string to codepoint (integer) first, and then it's just chr:

>>> chr(int("05d1", 16))
'ב'

Upvotes: 5

Related Questions