hi, iām trying to generate c code from python, and currently using json.dumps to make string literals. however it has a problem with high characters:
Very much depends on other details of what you are trying to achieve.
Some things that might help you:
u = 'š§'
b = u.encode('unicode_escape')
u2 = b.decode('unicode_escape')
o = ord(u)
u3 = chr(o)
print(u2)
print(u3)
print(json.loads(json.dumps("š§")))