# decode: produces unicode
# encode: produces string
import codecs
fun = codecs.getdecoder("iso8859_7")
a = u"thanasis"
a = "".join([chr(ord(c)) for c in a])
for c in a:
print ord(c)
b = fun(a)
#b = a.encode("iso8859_7", "strict")
print "b=", b
print "b type=", type(b)
print "b type=", type(b[0])