Hello developers, I discovered recently that the irc client `rcirc', although has an max-message-length set, but it simply uses (length str) for detecting the output length, which is not desirable for multibyte users because usually our characters encode to more than one byte, and this causes an error that the client actually sends out more bytes than the standard has required (512 bytes to my understanding). This limit is easily reached since chinese characters are usually encoded with 3 bytes for one character. By this error, if the server truncates the result string simply by bytes, then it's known to cause the string to become entirely scrambles for xchat. I'm attaching a patch to perform an binary search for multibyte strings, and this patch should not have any penalties for original ascii users since it begins with a (multibyte-string-p) to decide which style to use.