data="";
for x in range(255):
data = data + chr(x)
return (data)
This is written in python and using flask framework.
I am trying to send Integer value to my hardware but as flask return does not support it I had to convert them to a string of respective ASCII values.
From 0-127 things are fine but after that, I am getting UTF-8 encoded value. Please see the screenshot of the terminal window below. Is there any way that I can get respective integer value instead of UTF-8 when converted above 127.
For example: chr(128) => when returned should give 128 not UTF-8
What I am looking for, how I can get the same integer value even after 127?