Open hyzeer opened 4 years ago
Hi,
I think we can add override for encoding, let me try it (however it will take time, busy days)
Thanks for your reply in busy days. :)
another point, at v1.3.3, chars length handle error, I did this to avoiding the error:
for x in ap_list:
difference = len(x[0].decode().encode('utf-8')) - len(x[0].decode())
yield '"ssid": "{}",'.format(x[0].decode()) + 'a' * difference
I used the above codes, utf-8 chars can be handled propely by tinyweb and decoded correctly by the browser. I don't know why it happened. 🤣
Hi, thanks for your new firmware, it can handle UTF-8 char properly, but it has new problem about garbling. my codes is the following:
the above codes works correctly if values of resp['result'] contains no UTF-8 chars, otherwise the front end would receive unreadable code, like this:
I guess this due to Content-Type field should not be 'application/json;charset=utf-8' in Response-Header, but I can't debug it..