Sep-08-2018, 01:55 AM
when using the Unicode type in Python 2, what are the ord() and chr() like functions to convert to the numeric values of the characters and back? ok, ord() works but chr() is limited to values less than 256. or do i need to do this:
def uchr(u): return eval("u'\\u"+hex(u+2**24)[-max(len(hex(u))-2,4):]+"'")