# PythonWin assumes strings are encoded in LATIN-1
# PythonWin prints strings as encoded in UTF8
value = "teinté"
print("Displayed in original encoding: "),
print(value)
print("Ord\tLATIN-1\t\tUTF8")
for x in value.decode('LATIN-1'):
print(str(ord(x)) + "\t"),
print(x.encode('LATIN-1') + ' \t\t'),
print(x.encode('UTF8'))
value3 = value.decode('LATIN-1')
print
(
Read more... )