Hi, I can extracted the encoded value as bytes. But is there a way to extracted the decoded value (for á, it is C1)? Thanks.
$ cat ./dumpunicode.py #!/usr/bin/env python3 while True: c = sys.stdin.read(1) if c: print(c) print('0x' + ''.join(['%x' % x for x in reversed(bytes(c, encoding='utf-8'))])) else: break $ ./dumpunicode.py <<< á á 0xa1c3 0xa -- Regards, Peng -- https://mail.python.org/mailman/listinfo/python-list