I am trying to encode and decode the Hebrew string "שלום". However, after encoding, I get gibberish:
>>> word = "שלום"
>>> word = word.decode('UTF-8')
>>> word
u'\u05e9\u05dc\u05d5\u05dd'
>>> print word
שלום
>>> word = word.encode('UTF-8')
>>> word
'\xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d'
>>> print word
׳©׳׳•׳
How should I do it properly?
sys.getdefaultencoding()
in your terminal? – Satchel