tintin
tintin copied to clipboard
BUG: the return value of utf8_to_gbk1 seems incorrect
Generally, a Chinese character should be 3 bytes using utf8 encoding, and 2 bytes using gbk, so usually utf8_to_gbk1 should return a smaller number (compared to the input parameters), but I observed by printing the debug log, The return value of utf8_to_gbk1 is always larger than expected.
In fact, I also discovered through packet capture that when I connect to the gbk server and send commands containing Chinese characters, there is always a string of zeros after the bytes actually sent on the socket.
Please help me check if something is wrong with utf8_to_gbk1. Thank you.
Thanks, looks like it wasn't keeping proper track of the input length.
I've updated the beta with a fix, would you mind checking if the problem is fixed?
I just tested it and it's fine now. Thank you!